"The expression On Click you entered as the event property setting produced the following error: User-defined type not defined.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or macro"
Here is the Code that I used:
Expand|Select|Wrap|Line Numbers
- Private Sub Command_Click() .
- DoCmd.SendObject acSendForm, "myForm", acFormatXLS, "someone@somewhere.com", , , _
- "Email with attached report", "This is the email body.", True
- End Sub