Programming Error on an Emailer Mod

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RunTime Error 0
Run Time Error 0
Running Macro - output pivot table to excel - error message 2046 0
Set MyValue 1
Status Bar 0
Error 20 Resume without Error 2
Error Handling Problem 1
Error message with Macro 1

Top