Not sure if report is closed

R

Richard

Hi

I have a command button "print" that opens a new instance of a report and
opens the print dialog (the report don't show) with this code:

On Error Resume Next
Dim rpttemp As Report_Cheque

DoCmd.OpenReport rpttemp, acViewPreview
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, rpttemp

Should I assume that the report is closed?

Many thanks in advance
Richard
 

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