This is a discussion on Add double message boxes within the Microsoft Access forums, part of the Question Forums category; Can I have a message box come up and ask do you want to print now. If yes print report ...
Can I have a message box come up and ask do you want to print now.
If yes print report "RptWorkOrder" if no CANCEL PRINT
If it is Yes then print the form and I want another message box to appear. I want it to say "Enter white paper in printer then hit OK" When they hit OK it would then print.
Can anyone help me with code I can attach to a print button.
Thank You very much,
"It is so nice, to see so many, that know so much"
Using Excel 2007
I hope this will help.
Code:Private Sub cmdPrint_Click() If MsgBox("Do You want to Print the Report...?", vbYesNo + vbDefaultButton2 + vbQuestion, "Print Report") = vbYes Then MsgBox "Load White Paper on Printer and Hit OK" DoCmd.OpenReport "myReport", acViewPreview End If End Sub
www.MsAccessTips.com (Learn MS-Access Tips and Tricks)
Learn Advanced MS-Access Programming with sample VBA Code.