Results 1 to 6 of 6
  1. #1
    Badvgood is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    4

    Expression help for a beginner

    Hi All,



    I need to write an expression that basically says the opposite of this one

    <=Now()+42 And >=Now()+36

    So the expression I need will be for any dates except them above.

    Any help would be great and thanks in advance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How about

    > Now()+42 Or < Now()+36
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Try this: Between Now()+42 and Now()+36

  4. #4
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    PBaldy posted just before me and his solution is better. I missed the = sign

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I think Between would be the appropriate way to duplicate that expression, but unless I've misread, the goal is to get the opposite result, in other words the records NOT between those dates. I've never tried, but I suppose this might work:

    Not Between Now()+36 and Now()+42

    Also, note I reversed the dates to make the smaller one first. In my experience, Between will usually handle it correctly either way, but in certain circumstances will fail when the larger value is first. I just can't remember what the circumstances are.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    PBaldy is correct I misread the original question saw the <= and >= but didn't pay enough attention to the rest. missed the fact that the first part was <=42 and the second was >= 36. Need to pay more attention and not assume everybody does things the same way I do.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Beginner at relationships.
    By Juice118 in forum Database Design
    Replies: 6
    Last Post: 08-02-2011, 09:33 AM
  2. Help a DB beginner
    By adquinn in forum Access
    Replies: 0
    Last Post: 02-08-2011, 08:25 PM
  3. Beginner Access Help
    By Joseph in forum Access
    Replies: 1
    Last Post: 03-07-2010, 04:36 PM
  4. Absolute Beginner Help
    By jonesbp in forum Access
    Replies: 1
    Last Post: 08-17-2009, 08:23 PM
  5. Need help! Access beginner here!
    By Joshin in forum Access
    Replies: 1
    Last Post: 06-09-2009, 05:12 PM

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