how do I apply a filter to a command button then open a report

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

Guest

From A command button, I want to filter on a query and then open or preview a
report and print the results, i will have a few buttons on the same form
runing from the same query but runing a diffrent query and the same report.
 
You can create the command button using the wizard. Then modify the code to
look like:

Dim strWhere as String
strWhere = "[SomeField]= 'some value'"
DoCmd.OpenReport "rptSomeReport", , , strWhere
 
Back
Top