I am using the DoCmd.SendObject statement to create an email. I use a couple of user created functions to create the body and the email address list. The first time I hit the command button, everything works fine. The email is created with all of the correct information. However, if I close the email and hit the command button again, an email is not created a second time. The docmd.close statemnt runs but not the SendObject statement. I have to close out of the database and reopen for it to run correctly.
Is there a way around this?
Thanks
Is there a way around this?
Code:
lineSpace = Chr(13) & Chr(13)
body = lineSpace & CreateMessage()
subject = "Service Request"
eMailAddresses = PopulateEmail() & EmailAddressesFromCheckBoxes()
DoCmd.SendObject acSendNoObject, , , EmailAddresses, , , subject, body
DoCmd.Close
Thanks