Can anyone help
I currently have some code for creating an email which works fine until I change my mind and cancel the email
I was getting a msgbox pop up saying send action cancelled
and now my access hangs and when I try to close access it says
You can't exit Microsoft Access right now as you are running a DDE or OLE procedure. You may need to inturupt the module
I'm not sure what this means or what I have done so any help would be appreciated
My code is as follows
Private Sub Email_Works_Owner_Click()
On Error GoTo Err_Email_Works_Owner_Click
If Me.Clash_or_Not = "Handover Required" Then DoCmd.SendObject acSendReport, "Work Planning Report", acFormatSNP, Me.User_Email_Address, "", "", "14 Day Planning Work Sequencing", "Please note work I am trying to plan works on the" & Me.My_System_to_be_worked_on & " at " & Me.My_Building & (Chr(13) + Chr(10)) & "from " & Me.My_Start_Date & " to " & Me.My_End_Date & " and it has been identified that there is a handover required" & (Chr(13) + Chr(10)) & "A report is attached showing all work taking place at the same time. I will call you to discuss sequencing", True, ""
If Me.Clash_or_Not = "Clash" Then DoCmd.SendObject acSendReport, "Work Planning Report", acFormatSNP, Me.User_Email_Address, "", "", "14 Day Planning Work Clash", "Please note work I am trying to plan works on the" & Me.My_System_to_be_worked_on & " at " & Me.My_Building & (Chr(13) + Chr(10)) & "from " & Me.My_Start_Date & " to " & Me.My_End_Date & " and it has been identified that there is a clash with works at " & Me.Building & (Chr(13) + Chr(10)) & "A report is attached showing all work taking place at the same time. I will call you to discuss the possibility of altering the date or sequencing the work", True, ""
If IsNull(Me.Clash_or_Not) Then DoCmd.SendObject acSendReport, "Work Planning Report", acFormatSNP, Me.User_Email_Address, "", "", "Planning Work Report", "Please find attached a report identifying works from " & Me.My_Start_Date & " to " & Me.My_End_Date, True, ""
Exit_Email_Works_Owner_Click:
Exit Sub
Err_Email_Works_Owner_Click:
MsgBox Err.Description
Resume Exit_Email_Works_Owner_Click
End Sub
I currently have some code for creating an email which works fine until I change my mind and cancel the email
I was getting a msgbox pop up saying send action cancelled
and now my access hangs and when I try to close access it says
You can't exit Microsoft Access right now as you are running a DDE or OLE procedure. You may need to inturupt the module
I'm not sure what this means or what I have done so any help would be appreciated
My code is as follows
Private Sub Email_Works_Owner_Click()
On Error GoTo Err_Email_Works_Owner_Click
If Me.Clash_or_Not = "Handover Required" Then DoCmd.SendObject acSendReport, "Work Planning Report", acFormatSNP, Me.User_Email_Address, "", "", "14 Day Planning Work Sequencing", "Please note work I am trying to plan works on the" & Me.My_System_to_be_worked_on & " at " & Me.My_Building & (Chr(13) + Chr(10)) & "from " & Me.My_Start_Date & " to " & Me.My_End_Date & " and it has been identified that there is a handover required" & (Chr(13) + Chr(10)) & "A report is attached showing all work taking place at the same time. I will call you to discuss sequencing", True, ""
If Me.Clash_or_Not = "Clash" Then DoCmd.SendObject acSendReport, "Work Planning Report", acFormatSNP, Me.User_Email_Address, "", "", "14 Day Planning Work Clash", "Please note work I am trying to plan works on the" & Me.My_System_to_be_worked_on & " at " & Me.My_Building & (Chr(13) + Chr(10)) & "from " & Me.My_Start_Date & " to " & Me.My_End_Date & " and it has been identified that there is a clash with works at " & Me.Building & (Chr(13) + Chr(10)) & "A report is attached showing all work taking place at the same time. I will call you to discuss the possibility of altering the date or sequencing the work", True, ""
If IsNull(Me.Clash_or_Not) Then DoCmd.SendObject acSendReport, "Work Planning Report", acFormatSNP, Me.User_Email_Address, "", "", "Planning Work Report", "Please find attached a report identifying works from " & Me.My_Start_Date & " to " & Me.My_End_Date, True, ""
Exit_Email_Works_Owner_Click:
Exit Sub
Err_Email_Works_Owner_Click:
MsgBox Err.Description
Resume Exit_Email_Works_Owner_Click
End Sub