Perameter Query to select only current month

tpeter

Registered User.
Local time
Yesterday, 16:24
Joined
Dec 1, 2006
Messages
36
I have a perameter query that tracks everyone's time on different projects. When they click on the command button to run the query they are asked for the current start data and end date (this is loaded into the date field within the query on the criteria cell). When they click on this query I would like them to only be able to view the current month instead of any date range. The query is set up on a short date format and I have tried some diffent combinations but can't figure out exactly what to put into the criteria. Any help would be great.

Tim
 
WHERE Month(DateField) = Month(Date()) AND Year(DateField) = Year(Date())

Where DateField is the name of your date field.
 
WHERE Month(DateField) = Month(Date()) AND Year(DateField) = Year(Date())

Where DateField is the name of your date field.

This information is typed directly into the criteria cell of the query?
 
No that's the actual SQL. Let's see, maybe this will be easier for you. Put this in the criteria of the date field:

Between DateSerial(Year(Date()),Month(Date()),1) And DateSerial(Year(Date()),Month(Date())+1,0)
 
Thanks Paul, I haven't had a chance to load it in but I really appreciate your help and quick responce.

Tim
 

Users who are viewing this thread

Back
Top Bottom