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

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
 
R

Rob W

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
 
R

Rob W

DoCmd.OpenReport "rptStudentClassification", 5, , Normal

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

What does the 5 mean?
 

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

Top