Selecting a month for a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database and want to print monthly reports for 3 different
agencies. I have developed the query to include the months, years and the
three agencies. I need to be able to have each agency select themselves and
then the month that they want the report to include.
Thanks
Brian
 
base the report on the query. create a form with two combo boxes: one
listing the agencies, and another listing the months. the user selects the
agency name and the month s/he wants then clicks a command button. add code
to the button to open the report, with a WHERE clause, as

DoCmd.OpenReport "MyReportName", , , "MyAgency = '" _
& Me!cboAgency & "' And MyMonth = " & Me!cboMonth

substitute the correct name of the report, the correct names of the agency
field and the month field (from the query underlying the report), and the
correct names of the combo box controls on the form.

hth
 

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

Similar Threads


Back
Top