Hello
sorry to confuse matters but have moved this question from the forms forum as after further investigation on the other sites it looks like its a code problem
I have used the code suggested and still have problems. That is when I cancel my email I my DB freezes and the only thing I can do is to close via the task manager
When I close the email without sending I get this message
"The sendobject action was cancelled
You used a method of the DoCmd object to carry out an action in visual basic, but then clicked cancelling a dialog box.
For example, you used the close method to close a changed form, then clicked cancel in the dialog box that asks if you want to save the changes you made to the form."
and after closing via the task manager I get the following message
"You can't exit the database now
If you are running a visual basic module that is using OLE or DDE, you may need to interrupt the module"
My code, as previously suggested, is as follows
Private Sub EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click()
On Error GoTo Err_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click
DoCmd.SendObject acReport, "Pending All Vendor Authorisations", "SnapshotFormat(*.snp)", "", "", "", "Approvals Required", "Please note there are a number of Approvals now required", True, ""
Exit_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click:
Exit Sub
Err_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click:
Select Case Err.Number
Case 2501
Resume Next
Case Else
MsgBox "Err " & Err.Number & ": " & Err.Description
End Select
Resume Exit_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click
End Sub
sorry to confuse matters but have moved this question from the forms forum as after further investigation on the other sites it looks like its a code problem
I have used the code suggested and still have problems. That is when I cancel my email I my DB freezes and the only thing I can do is to close via the task manager
When I close the email without sending I get this message
"The sendobject action was cancelled
You used a method of the DoCmd object to carry out an action in visual basic, but then clicked cancelling a dialog box.
For example, you used the close method to close a changed form, then clicked cancel in the dialog box that asks if you want to save the changes you made to the form."
and after closing via the task manager I get the following message
"You can't exit the database now
If you are running a visual basic module that is using OLE or DDE, you may need to interrupt the module"
My code, as previously suggested, is as follows
Private Sub EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click()
On Error GoTo Err_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click
DoCmd.SendObject acReport, "Pending All Vendor Authorisations", "SnapshotFormat(*.snp)", "", "", "", "Approvals Required", "Please note there are a number of Approvals now required", True, ""
Exit_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click:
Exit Sub
Err_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click:
Select Case Err.Number
Case 2501
Resume Next
Case Else
MsgBox "Err " & Err.Number & ": " & Err.Description
End Select
Resume Exit_EMAIL_VENDOR_AUTHORISATIONS_REQUIRED_Click
End Sub