i would hope you have a table to store 'names/clients/accociates' and their emails. a form for that.
the other form, is to make the email details; who,subject, body, etc.
a listbox on this form would have the list of names/emails, youd select 1 or filter the list (by group?)
the query of the report uses the listbox to pull the info for just that 1 person.
fill in the text boxes, select 1 email from listbox , click Send btn.
'email the rpt
docmd.SendObject acSendReport ,txtReport,acFormatPDF, vTo,,,txtSubj,txtBody
or
docmd.SendObject acSendQuery , "qsRptQry",acFormatXLS, vTo,,,txtSubj,txtBody
i have this:
in addition, i have a checkbox : chkALL, to send this to everyone in the list
the code is then:
Code:
sub btnSend_click()
dim vTo
dim i as integer
dim sToList as string
if chkALL then
for i = 0 to lstBox.listcount -1
vTo = lstBox.itemdata(i) 'get next email in listbox
lstBox = vTo 'set the listbox to this item
'email the rpt
docmd.SendObject acSendQuery , "qsRptQry",acFormatXLS, vTo,,,txtSubj,txtBody
next
else
docmd.SendObject acSendQuery , "qsRptQry",acFormatXLS, vTo,,,txtSubj,txtBody
endif
end sub