Problem: Export field info to email message

S

scubadiver

Hi,

I am using the following code to export field info to an email but it works
fine ONLY after I first open the DB (ignore "blah blah")

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

When I try to click on the button again I get a 2957 run-time error. The
"DoCmd" line gets highlighted.

Any ideas why I can't do this repeatedly?

cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top