printing from a certain date to a certain date

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

Guest

I have a uncomplicated little database that lists certain jobs I have done
when I have done them. I would like to set up a user definable print form
allowing me to specify the start and end dates of the reports to be printed.
Or, even more simply to print a certain month at any time.

Tanks
 
Base your report on a query. Include all the fields you want in your report.
Include the DateDone field and in a blank field in the query enter:
MonthDone:Month([DateDone])
Put the following in the criteria:
Forms!PFrmMonthToPrint!MonthToPrint

Create a popup form named PFrmMonthToPrint, add a combobox and name it
MonthToPrint. Make the rowsource property a value list that looks like:
1,January;2,February;3,March;.......12,December
Go to the Data tab and set the bound column property to 1. Go to the Format
tab and set column count to 2 and column widths to 0;1. Put the following
code in the combobox's AfterUpdate event:
Me.Visible = False

Put the following code in the report's Open event:
DoCmd.OpenForm "PFrmMonthToPrint",,,,,acDialog

Put the following code in the report's Close event:
DoCmd.Close acForm, "PFrmMonthToPrint"

When you go to open the report, your popup form will appear first. After you
select the month, the popup form will disappear and your report will open
with only the jobs in the month you selected.
 
Back
Top