Results 1 to 2 of 2
  1. #1
    ssturges is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    5

    Help with using the AND condition

    So, I'm trying to use a condition statement to show a record only when. A records month is 1 month away from the ending month, or the "end date".

    Basically Im trying to say, if the current date has a difference of at no more than 1 month from the end date, then show.



    Thus far I have this is in my criteria field:

    DateAdd("m",[LeasingTerm],[CommenceDate])<DateAdd("m",-1,[CommenceDate]) AND( [CommenceDate] > DateAdd("m",([Leasing Term] -1),[CommenceDate])

    Any help would be greatly appreciated thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Need to understand data structure better. You say '1 month from the end date' but use CommenceDate in the criteria. What field is criteria for? Is this expression in a query? Show the entire SQL statement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. IIF condition -Newbie
    By bldrc in forum Access
    Replies: 9
    Last Post: 07-21-2011, 01:30 PM
  2. where condition within a macro
    By kstyles in forum Reports
    Replies: 3
    Last Post: 04-08-2011, 03:58 PM
  3. Macro Condition
    By eww in forum Programming
    Replies: 5
    Last Post: 08-27-2010, 10:59 AM
  4. condition in macros
    By frcastro in forum Programming
    Replies: 1
    Last Post: 06-23-2010, 03:16 AM
  5. How to use IIF condition
    By nshaikh in forum Queries
    Replies: 4
    Last Post: 09-12-2008, 01:23 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