- 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"))
=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"))