Access MS Access 2010 IIF statement to check if one date is in or out of range of two other dates (fields)


Joined
May 27, 2015
Messages
1
Reaction score
0
I am also new to Access 2010 so am slowly learning my way around. I need an iif statement that will allow me to create a new column telling me whether one date field (Course Date) is within or outside the range of two other date fields (Previous Effective Date) and (Previous Expiration). I hope that someone can help me solve this issue quickly. I've tried various ways to write the statement and none of them worked. One statement only returned the information as all being outside of the range, which I could clearly see was not true. Here are some examples of what I tried. None of these worked at all. Thanks. Joyce

=IIf(([course date]>=[Previous Effective Date] and <=[Previous Expiration Date]),"between dates",IIf([course date]<=[Previous Effective Date] and >[Previous Expiration Date]),"outside date range")

In/Out Range: IIf(([course date]>=[Previous Effective Date]),"between dates", And IIf([course date]>=[Previous Expiration Date],"outside date range "))

In/Out of Range: IIf(([course date]>=[Previous Effective Date] And <=[Previous Expiration Date], "between dates") And IIf([course date]<=[Previous Expiration Date] And >=[Previous Expiration Date], "outside date range"))
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top