Reports by Month?

J

Jeff

Again, I am a newbie at code. My users need to be able
to print a report for whatever month they want. I have
been able to successfully create a report that has all
records between 2 dates specified by the user. I know
they can put the first day of the month and the last and
that would work for them, but is there a easier way to do
this? Can you create a text box with all the months in
it and have them select the month and it automatically
pull in all records with dates in that month?
 
F

fredg

Again, I am a newbie at code. My users need to be able
to print a report for whatever month they want. I have
been able to successfully create a report that has all
records between 2 dates specified by the user. I know
they can put the first day of the month and the last and
that would work for them, but is there a easier way to do
this? Can you create a text box with all the months in
it and have them select the month and it automatically
pull in all records with dates in that month?

Here a few examples.

Where Month([DateField]) = [Enter Month Number]

will return all record for the month (for all the years in the
database).

Where Month([DateField]) = [Enter Month Number] AND Year([DateField])
= [Enter Year]

will restrict records to the month of the year entered.
Enter at each prompt 5 then 2003 to get May 2003 records
or...

Where Format([DateField],"m/yyyy") = [Enter month and year m/yyyy]

At the prompt enter 5/2003 to get May 2003 records
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top