problem with email

jon98548

Registered User.
Local time
Today, 17:32
Joined
Feb 14, 2003
Messages
141
I have a button on a form that when pressed closes my form and sends a report to email recipients. This works great the first time, but if I reopen my form and try to send it again either nothing at all happens or I get a SendObect error. Should I have something else in the code to clear it?

On Error GoTo Err_cmdSendResolutions_Click

Dim stDocName As String

stDocName = "rptCompleteResolutions"
DoCmd.Close
DoCmd.SendObject acReport, stDocName, acFormatSNP, , , , _
"Subject", "Message"

Exit_cmdSendResolutions_Click:
Exit Sub

Err_cmdSendResolutions_Click:
MsgBox Err.Description
Resume Exit_cmdSendResolutions_Click
 
Using Access 2000 right? With this version there is something wrong with the sendobject command in VBA. Nothing on your part. What I did to solve the problem is use a macro. Sometimes I use a combination of vba and a macro when I need to send to multiple recipients.
 
Absolutely beautiful! It worked great. Thank you! Any idea why that happens with the code?
 
Don't know what it is. Something in the source code. Microsoft's aware of it and they did correct it for 2002.
 

Users who are viewing this thread

Back
Top Bottom