Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email from Access

Status
Not open for further replies.

doctorswamp

Technical User
Jul 15, 2003
133
GB
Hi all

There are some useful FAQs on this, but have a small problem. Sorry it may be old ground.

Want to email people selected in a fixed query using a command button. This code nearly does it

----------------

Dim rs As DAO.Recordset
Dim qd As DAO.QueryDef

Set qd = CurrentDb.QueryDefs("qryEmail")
Set rs = qd.OpenRecordset

Do Until rs.EOF
DoCmd.SendObject , , , rs!Email, , , "Subject words", "Body words"
rs.MoveNext
Loop

----------------
The problem is the messages aren't immediately sent to the Outbox, so I have to click Send for each one. How do I send them straight to the outbox?

I'd also prefer to do a filter by form and use the output as the email source rather than the fixed query. How could this be done?

Finally, instead of putting the subject and body text into the code, can I say put them into fields on the form - or somewhere else?

Many thanks

 
How are ya doctorswamp . . .

Have a looked here: thread702-396121

Calvin.gif
See Ya! . . . . . .
 
Hiya AceMan

Still living up to your name, many thanks.

It's a huge thread so I'll have a grapple when the sun stops shining.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top