Printing report

S

Snurre

Hi..

When I am running code to show print dialog box, the box
is displayed before the report. This is due to that the
report take som time to be generated, but the code goes to
next line. The report will not show in preview mode, until
I choose a printer. But then I print a report I cannot
preview, the Preview is executed after printeing !!

How do I stop code from execuitng until report is
previewed?

It does not matter if I take the runcommand after End
With...

Private Sub print_Click()

With DoCmd
..OpenReport "report", acViewPreview
..Maximize
..RunCommand acCmdPrint
End With

End Sub

snurre
 
Top