Access 2007: How to run reports from forms???

  • Thread starter Thread starter Rob W
  • Start date Start date
R

Rob W

Greetings,

I designed a form and ran the macro button wizard to create a button (with
macro) to run my report.
This worked fine, with my report output also containing buttons to exit and
print the report.

I later wanted to add validation to check if the report was empty, so I
removed the button created by the wizzard and created my own, adding my own
vba code.

The problem lies I can only run the report using 'DoCmd.OpenReport
"rptStudentClassification", acViewPreview'
but this is a preview mode only and therefore cannot use buttons present on
the report.

How do i run the rpeort to show output and allow buttons to be used?

Cheers
Rob
 
Or to clarify further havig both buttons which openReport the wizard does
NOT have magnify class allowing buttons to be pressed my own button does.

Macro codes uses ptStudentClassification, Report, , , Normal as the params.

Confused.com
 
DoCmd.OpenReport "rptStudentClassification", 5, , Normal

Examing the macro (step by step) it runs this line of code.

What does the 5 mean?
 
Back
Top