acpreview

  • Thread starter Thread starter mark r
  • Start date Start date
M

mark r

1. if I type DoCmd.Openreport strdocname Acpreview
DoCmd.Openreport strdocname AcNormal

Rather than display the report and print it after I close
the report window, it just prints....then sometimes it
goes to Design view and I didn't even use AcDesign !
 
mark said:
1. if I type DoCmd.Openreport strdocname Acpreview
DoCmd.Openreport strdocname AcNormal

Rather than display the report and print it after I close
the report window, it just prints....then sometimes it
goes to Design view and I didn't even use AcDesign !


Your syntax is all out of whack.

DoCmd.OpenReport strdocname , acViewPreview
or
DoCmd.OpenReport strdocname , acViewNormal

But, you can not open the same report a second time and
OpenReport does not block execution while the report is
displayed.

I suggest that you just open it in preview and let the user
decide if they want a printed copy. And/or provide two
buttons on the form, one for preview and another for print.
 
Back
Top