Hi
I"m a novice at anything access, so I apologize in advance for my ignorance. I am trying to get access to email a report to email addresses in a query (qry_contacts). Filed Names within the query is called "email". I am able to get access to generate the email, but the only way I can get anything in the "TO" field is if i hard code it in the VBA (type the actual email address in there). Please see below for my code. I appreciate your help in advance. I apologize also, if there are a million examples of this elsewhere. But if you point me to one of them, I'm not going to be able to figure out how that applies to mine. Thanks. Also, I dont know if it matters or not, but I'm using Lotus Notes as my email client.
Private Sub MAIL_Deferred_DTSR_List_Click()
On Error GoTo Err_MAIL_Deferred_DTSR_List_Click
Dim stDocName As String
stDocName = "rpt_Deferred_DTSR_List_By_Plant"
DoCmd.SendObject acReport, stDocName, "Rich Text Format"
Exit_MAIL_Deferred_DTSR_List_Click:
Exit Sub
Err_MAIL_Deferred_DTSR_List_Click:
MsgBox Err.Description
Resume Exit_MAIL_Deferred_DTSR_List_Click
End Sub