I want to open a report in preview mode via a button on a form, give the user the chance to print the report or not, then open a MsgBox that asks if the report printed ok (printer might be down, wrong paper, etc). If the answer is 'Yes', then I do an update query on a table. Following is my code so far:
stDocName = "rptLetterConfirmation"
DoCmd.OpenReport stDocName, acPreview, , , acDialog
Msg = "Confirmation Letters Print Correctly?" ' Define message.
Style = vbYesNo + vbDefaultButton2 ' Define buttons.
Title = "Confirmation Letters" ' Define title.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes
'SQL to fill TchLtr with Date()
SqlStr = "UPDATE tblOrders SET tblOrders.TchLtr = Date() " & _
"WHERE (((tblOrders.TchLtr) Is Null));"
The problem is that when the report preview becomes modal the user can't get to a print command. If I make the report preview non-modal, the MsgBox appears and seems to always be modal. Hence, the user can't get back to the preview report to print it without answering the MsgBox first. If I could make the MsgBox non-modal, I think I'd be ok.