Run-Time Error 2766

R

Rpettis31

The object doesn't contain the Automation object CAR.


Private Sub cmbxEmailCarRequest_Click()

Dim stDocName As String

stDocName = "CarRequest.Email Car Request"
' Define Strings for email
CAR = "CAR"
Iss = "Has been issued for item:"
Isss = "with the following issue:"
ass = "This issue has been assigned to,"
aud = "The audit results were :"

DoCmd.RunMacro stDocName

Exit_cmbxEmailCarRequest_Click:
Exit Sub

Err_cmbxEmailCarRequest_Click:
MsgBox Err.Description
Resume Exit_cmbxEmailCarRequest_Click

End Sub
 
R

Rpettis31

This was just a macro in the macro window, I went to an event procedure and
this was the code I modified it to incorporate strings in the hope I could
get a longer message in the email body.

The CAR is the form the command button is on.

Should I be using a WithForms statement?

I am obviously doing something wrong and I am not that experienced in Access.
 

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


Top