I'm having trouble getting Access to perform a query involving a date range. Ultimately, I am trying to get it to automatically pick a range of dates based on what the system date is. The query pulls its information from a table called "reports" and the date field is called "RepPer". For test purposes in the statement I have used, false statements return a set date, but will probably return something different when I've got this problem sorted. True statements should return the range associated with the system date.
Can anyone see where I'm going wrong?
In the end, I'm going to have to put something like this into an array in order to make the statement evaluate itself correctly for like the next 18 months. I want to make sure I understand what I'm doing for a single month first though.
I have looked through the archives already and quite much time has been spent on the help file. I guess I don't have enough of a grasp on Access though.
Any help or alternate suggestions would be greatly appreciated.
Erich
Code:
IIf((Date()>#5/19/2003#) And (Date()<#6/17/2003#),[reports.RepPer]=(([reports].[RepPer]) Between #5/20/2003# And ([reports].[RepPer])<#6/16/2003#),#9/4/2003#)
Can anyone see where I'm going wrong?
In the end, I'm going to have to put something like this into an array in order to make the statement evaluate itself correctly for like the next 18 months. I want to make sure I understand what I'm doing for a single month first though.
I have looked through the archives already and quite much time has been spent on the help file. I guess I don't have enough of a grasp on Access though.
Any help or alternate suggestions would be greatly appreciated.
Erich
Last edited: