Hello,
I am having a problem with a small work order system i created.
I have an update form [frmworkorderupdate] that i enter data in and click cmdSubmitWO which opens another form [frmwoupdateemail].
I select my recipients from the list that i would like to send my update report to [rptstatusupdate] by click cmdOK (Report filters to selected record)
But i get an error popping up when the access/Deny screen for outlook comes up that says "Runtime Error '2293' Cannot send this email" But if i close it and try it again it will send the email just fine It's driving me nuts!!! :banghead:
Please help!
I am having a problem with a small work order system i created.
I have an update form [frmworkorderupdate] that i enter data in and click cmdSubmitWO which opens another form [frmwoupdateemail].
Code:
Private Sub cmdSubmitWO_Click()
DoCmd.RefreshRecord
Dim Response As Integer
Response = MsgBox("Would you like to notify others of this update?", vbYesNo + vbQuestion, "Client Prompt")
If Response = vbYes Then
DoCmd.OpenForm "frmWOupdateEmail"
Else
MsgBox "Update Completed successfully"
DoCmd.Close acForm, "frmworkorderUpdate", acSaveYes
'ADD this line
Cancel = True
End If
End Sub
I select my recipients from the list that i would like to send my update report to [rptstatusupdate] by click cmdOK (Report filters to selected record)
Code:
Private Sub cmdOK_Click()
DoCmd.OpenReport "rptstatusupdate", acViewPreview, , "[WorkOrderID]=" & Me!WorkOrderID
If Me.UpdateJake = True Then
DoCmd.SendObject acSendReport, "rptstatusupdate", "PDF", "jake@Email.com", , , "Work Order Update", "", False
End If
If Me.UpdateGreg = True Then
DoCmd.SendObject acSendReport, "rptstatusupdate", "PDF", "Greg@email.com", , , "Work Order Update", "", False
End If
If Me.UpdateMike = True Then
DoCmd.SendObject acSendReport, "rptstatusupdate", "PDF", "Mike@email.com", , , "Work Order Update", "", False
End If
If Me.UpdateLarry = True Then
DoCmd.SendObject acSendReport, "rptstatusupdate", "PDF", "Larry@email.com", , , "Work Order Update", "", False
End If
DoCmd.Close acForm, "frmWorkOrderUpdate", acSaveYes
DoCmd.Close acForm, "frmWOupdateemail", acSaveYes
DoCmd.Close acReport, "rptstatusupdate", acSaveYes
End Sub
But i get an error popping up when the access/Deny screen for outlook comes up that says "Runtime Error '2293' Cannot send this email" But if i close it and try it again it will send the email just fine It's driving me nuts!!! :banghead:
Please help!