Close Event to Print Report

velcrowe

Registered User.
Local time
Yesterday, 23:05
Joined
Apr 26, 2006
Messages
86
I am using the following dialog box to ask whether or not the user wants to print the report in the Close event of a report. I really need help finishing the code. As the user presses "X" to close the report, I would it to be that if the user says yes...the report prints. If the user says no...the report closes.:cool:


Private Sub Report_Close()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Print the Report?"
Style = vbYesNo + vbQuestion
Title = "Report"
Help = "DEMO.HLP"
Ctxt = 5000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then
 
Use
DoCmd.PrintOut .......

Lookup PrintOut in help or follow the intellisense directions.
 

Users who are viewing this thread

Back
Top Bottom