Is their an automatic function like "today" for something like "Previous Month"
We run reports all the time and we have to constantly put in between "1-1-12 and 1-31-12" It would be nice if there was something like "current month" or "previous month" sort of thing.
By doing the combo box, you can hide the start and end dates by setting the column widths to 0, but can refer to those columns in your code.
Note, that if you refer to these combo columns in code, you probably need to wrap them in the cDate( ) function to ensure they are treated as dates and not as text:
cDate(me.comboDates.column(1)) or cDate(me.comboDates.column(2))
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
BETWEEN DateSerial(Year(Date()), Month(Date()), 1)
AND DateSerial(Year(Date()), Month(Date()) + 1, 0)
For previous month use:
BETWEEN DateSerial(Year(Date()), Month(Date())-1, 1)
AND DateSerial(Year(Date()), Month(Date()), 0)