Results 1 to 2 of 2
  1. #1
    unique is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    3

    Between dates using Iif

    Sorry this might be an easy one for you guys - but im still new to access



    im trying to do an Iif statement between two dates on a text box for a report

    something like this


    ='Active ' & IIf(DateValue([InvoiceDate])>=DateValue('12/01/2007') AND DateValue([InvoiceDate])<=DateValue('02/01/2009'),'Yes','No')

    is these correct as i cant get it to work

    [InvoiceDate] is another field that is gets it datevalue from

    Thanks guys

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    IIf(([InvoiceDate]>=#12/01/2007#) AND ([InvoiceDate]<=#02/01/2009#),"Yes","No")

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

Similar Threads

  1. Accumulating Dates
    By blcknite in forum Access
    Replies: 2
    Last Post: 12-23-2009, 09:35 PM
  2. Dates by Group?
    By coliver in forum Reports
    Replies: 2
    Last Post: 11-07-2009, 09:03 AM
  3. VBA Glitch using Dates
    By stryker1080 in forum Programming
    Replies: 4
    Last Post: 10-05-2009, 04:57 PM
  4. Problems with Dates
    By oldteddybear in forum Queries
    Replies: 0
    Last Post: 08-22-2009, 07:12 AM
  5. Due dates
    By Mehbastan in forum Queries
    Replies: 5
    Last Post: 08-14-2009, 08:37 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