print report from a filtered form

O

Octavee Uhl

I have the folowing problem.

I want to use a form to filter my data and than print a
report with exactly this filter by clicking on a
commandbutton. how do I tell ms access to do just that?
 
C

Con Giacomini

Use the following OnClick code:

DoCmd.OpenReport "Filter by Form Report Name", acViewPreview, ,
Me.Filter

Of course you can substitute acViewPrint to go directly to the printer.

Con Giacomini
 
Top