Good afternoon. I have a command button that opens a report in print preview mode, and then opens the print dialog. Here's the code:
Code:
DoCmd.OpenReport "rptActivity", acViewPreview, , "ClientID=" & IDNumber
DoCmd.SelectObject acReport, "rptActivity"
DoCmd.RunCommand acCmdPrint
The problem is, when it runs the last line of code (the one that makes the print dialog pop up), the Preview goes blank- evertything disappears. So, the user might think that they are printing nothing.
In fact, when you follow through with the print, it works just fine. And after the print dialog closes, the Preview goes back to normal.
But I don't want to confuse the user by having the Preview look blank when the dialog is open. Why is it doing this, and how can I fix it? Thanks.
Matt