Email problem: run time error 2957

S

scubadiver

Hi,

I am using the following code to export field info to an email but it works
fine only when I first open the DB. When I try to click on the button again I
get the 2957 run-time error. The "DoCmd" line gets highlighted.

Any ideas?


Private Sub Tracksht_Click()

Dim strToWhom As String
Dim strMsgBody As String
Dim strSubject As String

strSubject = blah blah
strToWhom = blah blah
strMsgBody = blah blah

DoCmd.SendObject , , , strToWhom, , , strSubject, strMsgBody, True

End Sub
 
Top