Send Object doing funny stuff

K

Kevin Bruce

The following code opens my email client and waits for me to manually type
in the To, CC, etc.:

Private Sub cmdButton_Click()

DoCmd.SendObject acSendNoObject, , , , , , , , , True

End Sub

=========

That is as it should be. However, when I attempt to assign variables fill in
the To, CC, BCC, etc., automatically, nothing happens in the on_click event.

For example, the code below should put together all those addresses from the
query into the BCC. What happens, though, is nothing. The email client
doesn't even open.

Even stranger, is that this code ran perfectly well in a different copy of
the database with exactly the same object references.

Any ideas?

_Kevin
==========

Private Sub cmdButton_Click()

Dim strBCC As String
Dim db As Database
Dim recEvents As Recordset
Set db = CurrentDb()
strQuery = "qryBookingEmailVenueContacts"
Set recEvents = db.OpenRecordset(strQuery)

While Not recEvents.EOF
strBCC = recEvents("email") & ";" & strBCC
recEvents.MoveNext
Wend

DoCmd.SendObject acSendNoObject, , , , , strBCC, , , , True

End Sub

--
================================
Kevin Bruce
Program Coordinator
ArtStarts in Schools
301 - 873 Beatty Street
Vancouver, BC V6B 2M6

ph:604-878-7144 ext.3
fx: 604-683-0501

web: www.artstarts.com

Did you know that you can donate to ArtStarts in Schools directly from our
website? www.artstarts.ca
 

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

Similar Threads


Top