Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Why whenever I write a complex formula such a



    SELECT tblPersonnel.First_Name, tblPersonnel.Last_Name, tblPropPass.PropPass_ID, tblPropPass.Exp_Date
    FROM tblPersonnel INNER JOIN tblPropPass ON tblPersonnel.[Personnel_ID] = tblPropPass.[Personnel_ID]
    WHERE (([tblPropPass].[Exp_Date]>Date()));

    or the equivalent in query design, the and close the query design module, I only get part of it back.


    The remaining in in query design is just :

    >Date()

    There is nothing else. Now the whole SQL code is still there, but since I was using query design it was frustrating
    using the QD getting a Query to work, closing and opening up to find most of it missing. This is frustrating.

    Any help appreciated. Thanks in advance.

    R,


    Lou_Reed

  2. #17
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    The expression (tblPropPass.Exp_Date)>Date()+90 will produce only the license that has not expired after 90 days, not the ones that will expire
    in the next 90 days. The expression as you have it written will only show that one license. I tried that expression is why a flagged the error.

    I do not think that just reversing the sign would solve this. It is true it would show all the license that expire in the next 90 days, but wouldn't it show
    all the license that have already expired? In other words the exact opposite of what is written in the above paragraph.

    I would think that reversing the sign and adding a conjunction (and) would eliminate the expired licenses. Do you see an easier way of doing it?


    Respectfully,

    Lou_Reed
    Last edited by Lou_Reed; 05-24-2016 at 12:40 PM. Reason: correction

  3. #18
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    If old records remain with their due dates rather than get updated due dates, yes. How about

    Between Date() and Date() + 90
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #19
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    That is essentially what I did. I was unaware of the possibility of using the between command. Once I learned of that game over -answer easy.

    R,

    Lou_Reed

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-03-2015, 08:56 AM
  2. Replies: 3
    Last Post: 09-16-2015, 04:38 PM
  3. Replies: 7
    Last Post: 04-30-2014, 06:55 AM
  4. query criteria in access 2007
    By jeskit in forum Access
    Replies: 2
    Last Post: 11-23-2011, 06:44 AM
  5. Excel not using Access query criteria
    By thart21 in forum Queries
    Replies: 10
    Last Post: 04-30-2010, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums