hi ,
i have a query that gives me all the data for all records that are closed . how can i get it that it only gives me the data for the current month what do i put into the criteria
thank you
steve
hi ,
i have a query that gives me all the data for all records that are closed . how can i get it that it only gives me the data for the current month what do i put into the criteria
thank you
steve
Code:... WHERE ... AND Year(YourDate) = YEAR(Date) AND Month(YourDate) = Month(Date)
thanks .i am no good at putting code in .is iot possible to tell me what to type in the criteria .on the feild called "dateclosed" thanks steve
You substitute YourDate with DateClosed
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
It might depend on what you want when you run it on January 3rd for example. Would you be looking for records from December, or will it always be the current month of the current year? Also, I think those answers are exactly what your post asked for. By that I mean Closed will not be pertinent to what you're looking for. Try putting this in your year field in query design grid
Year(YourDateFieldNameHerer) = YEAR(Date) AND Month(YourDateFieldNameHere) = Month(Date)
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
In the field row you want Year(YourDateFieldNameHere)
In the Criteria row you want YEAR(Date)
Repeat in another column for the rest in the same way.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba