I'm having trouble getting this to work as it should, and maybe there's a better way I don't know about. I'm trying to write a VBA script to send an email out when a "Submit" command box is clicked on a form. I have this in the OnClick event.
Help is very welcome.Code:Private Sub Submit_Click() DoCmd.SendObject acSendForm, Me.[Entry Log], acFormatXLSX, "various.company_personnel@company.com", "", "", "Incident Report", "", True End Sub