Received the following error when clicking the command button to send the form in XLS format to recipients:
"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:
Looking for assistance in figuring out what I need to change in order to get this to work. I am using Access 2007-2016 (not my choosing). Thank you!
"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:
Code:
Private Sub Command_Click() . DoCmd.SendObject acSendForm, "myForm", acFormatXLS, "someone@somewhere.com", , , _ "Email with attached report", "This is the email body.", True End Sub
Comment