C
Chris
When I run the below code I keep getting an error saying
that it cannot use the output to function right now or
that I am using a read only database. The querys by
themselves run fine and once in a while the Mod will work
fine. I think the code is running into itself. Is there a
way to pause the code or is there a fix for this?
Function emailer1()
On Error GoTo emailer1_Err
DoCmd.SendObject
acQuery, "Non_Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
DoCmd.SendObject
acQuery, "Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdate_Sent_Non_Special_Delivery",
acViewNormal
DoCmd.OpenQuery "qryUpdate_Sent_Special_Delivery",
acViewNormal
DoCmd.SetWarnings True
emailer1_Exit:
Exit Function
emailer1_Err:
MsgBox Error$
Resume emailer1_Exit
End Function
that it cannot use the output to function right now or
that I am using a read only database. The querys by
themselves run fine and once in a while the Mod will work
fine. I think the code is running into itself. Is there a
way to pause the code or is there a fix for this?
Function emailer1()
On Error GoTo emailer1_Err
DoCmd.SendObject
acQuery, "Non_Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
DoCmd.SendObject
acQuery, "Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdate_Sent_Non_Special_Delivery",
acViewNormal
DoCmd.OpenQuery "qryUpdate_Sent_Special_Delivery",
acViewNormal
DoCmd.SetWarnings True
emailer1_Exit:
Exit Function
emailer1_Err:
MsgBox Error$
Resume emailer1_Exit
End Function