email 2 reports in 1 email

M

mega1

this is the code i am using

Dim MyDB As Database
Dim MyRS As dao.Recordset
Dim TheAddress As String
Dim stDocName As String
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset("qryEmailFlyer")
MyRS.MoveFirst
Do Until MyRS.EOF
TheAddress = MyRS![EmailAddress]

stDocName = "Movie Program"
DoCmd.SendObject acReport, stDocName, acFormatSNP, TheAddress, , ,
"movie program Starting " & Text2, "If you cannot view please download the
viewer at
http://www.microsoft.com/downloads/...3f-6d74-423d-8274-8b7e6313edfb&DisplayLang=en", False
DoCmd.SendObject acReport, "Synopsis", acFormatSNP, TheAddress, , ,
"Synopsis", , False

MyRS.MoveNext
Loop

but this sends 2 emails i only want to send 1
can any 1 help
 

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