Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Preview Option Box 1

Status
Not open for further replies.

jetspin

Programmer
Mar 5, 2002
76
Hi.

I came up with this simple and short solution to
give users the option to either "Print Now", "Preview"
or "Cancel" a report after clicking on a print
button. In this case the button is labled "Print Order"

MsgAnswer = MsgBox("Yes=Print Now. No=Preview. Cancel=Cancel.", vbYesNoCancel, "Print Options")

Select Case MsgAnswer
Case vbYes
DoCmd.OpenReport stDocName, acNormal
GoTo Exit_cmdPrintThisOrder_Click
Case vbNo
DoCmd.OpenReport stDocName, acPreview
GoTo Exit_cmdPrintThisOrder_Click
Case vbCancel
MsgBox "Print Cancelled.", vbOKOnly, "Print Message"
End Select

Exit_cmdPrintThisOrder_Click:
Exit Sub

Err_cmdPrintThisOrder_Click:
MsgBox Err.Description
Resume Exit_cmdPrintThisOrder_Click
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top