I have the following code in a report.
Private Sub Report_Close()
Dim Msg, Style, Title, Response
Msg = "Did you want to save this document to word?"
Style = vbYesNo + vbExclamation
Title = "Save to Word?"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
DoCmd.CancelEvent
Else
Exit Sub
End If
End Sub
What I want to happen is if the user selects 'Yes' then the close event is cancelled, however this is not happening!!
Any assistance would be greatly appreciated
lorraine
Private Sub Report_Close()
Dim Msg, Style, Title, Response
Msg = "Did you want to save this document to word?"
Style = vbYesNo + vbExclamation
Title = "Save to Word?"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
DoCmd.CancelEvent
Else
Exit Sub
End If
End Sub
What I want to happen is if the user selects 'Yes' then the close event is cancelled, however this is not happening!!
Any assistance would be greatly appreciated
lorraine