C
Chris
In the following function I have code that sends an email.
It worked initially but as I have added other things to
the dbs it now gives me the following error. When I hit
the debug button it goes to the first DoCmd Line.
Any help is appreciated
Thanks
Chris
Run-Time Error 2046
The Command or Action "Send Object" isn't available now.
*You may be in a read only database or an unconverted
databasefrom an earlier version of Mocrosoft Access
*The type of object the command applies to isn't currently
selected or isn't in the active window.
Use only yhe commands and macro actions that are currently
available for this database.
Function emailer1()
On Error GoTo emailer1_Err
If DCount("*", "Non_Special_Delivery") > 0 Then
DoCmd.SendObject
acQuery, "Non_Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdate_Sent_Non_Special_Delivery",
acViewNormal
DoCmd.SetWarnings True
End If
emailer1_Exit:
Exit Function
emailer1_Err:
Resume emailer1_Exit
End Function
It worked initially but as I have added other things to
the dbs it now gives me the following error. When I hit
the debug button it goes to the first DoCmd Line.
Any help is appreciated
Thanks
Chris
Run-Time Error 2046
The Command or Action "Send Object" isn't available now.
*You may be in a read only database or an unconverted
databasefrom an earlier version of Mocrosoft Access
*The type of object the command applies to isn't currently
selected or isn't in the active window.
Use only yhe commands and macro actions that are currently
available for this database.
Function emailer1()
On Error GoTo emailer1_Err
If DCount("*", "Non_Special_Delivery") > 0 Then
DoCmd.SendObject
acQuery, "Non_Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdate_Sent_Non_Special_Delivery",
acViewNormal
DoCmd.SetWarnings True
End If
emailer1_Exit:
Exit Function
emailer1_Err:
Resume emailer1_Exit
End Function