All of next month

  • Thread starter Thread starter Kevin Bruce
  • Start date Start date
K

Kevin Bruce

I send out monthly reminders to performing artists that list all of their
performances for the next calendar month. I am trying to write a single
query expression in the date field that will pull out all the records for
the next month without my having to type in a 'from date' and a 'to date'
each time. Thus, on any given day in, say February, when I run this query, I
want it to automatically pull all of the events for March and only March.
How can this expression be written?

Thanks in advance.
 
Kevin Bruce said:
I send out monthly reminders to performing artists that list all of their
performances for the next calendar month. I am trying to write a single
query expression in the date field that will pull out all the records for
the next month without my having to type in a 'from date' and a 'to date'
each time. Thus, on any given day in, say February, when I run this query, I
want it to automatically pull all of the events for March and only March.
How can this expression be written?

SELECT * FROM SomeTable
WHERE SomeDateField
BETWEEN DateSerial(Year(Date()),Month(Date())+1,1)
AND DateSerial(Year(Date()),Month(Date())+2,0)

The above assumes that SomeDateField does not contain a time element. If it
does then the final zero should be replaced with a 1.
 
Back
Top