We help IT Professionals succeed at work.

Difference between acViewPreview and acViewReport

baabaa_nl
baabaa_nl used Ask the Experts™
on
Hi Experts,

In Access VBA there are two commands used for the reports.

acViewPreview and acViewReport, could you please give the difference between both the commands.

Thanks in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Preview opens the Report in print preview mode, so you can view it before sending to Printer.

ViewReport  goes directly to Default (or specified) printer.
Most Valuable Expert 2012
Top Expert 2013
Commented:
That's actually incorrect.

acViewPreview opens the report in Preview mode, which is almost like a hardcopy of the report as seen on your monitor, with very little functionality once it is open.  You can program certain report events through VBA, but user controls such as command buttons are displayed only.

acViewReport  Is a feature in Access 2007 and later.  It appears similar to a print preview, however a report in Report View has limited form-like functionality, including user controls such as command buttons.

acViewNormal is the default view, which sends the report directly to a printer.
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
yep ... you are right ... I was thinking Normal ...
Top Expert 2011

Commented:
I also find the in ReportView (acViewReport) lots of events don't fire the same as in Print Preview.  

For some reports, I have to make two versions. One that works correctly in Report View. Another that works correctly in Print Preview.
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
baabaa_nl
Please hit the Request Attention button and select mbizup's answer, since mine incorrect.  It's just one of those day, sorry.

mx

Author

Commented:
Thank you DatabaseMX,

It was very kind of you to support the answer.

Thank you Moderator (ModCorlEEone)


baabaa_nl