Smudger Smith
I like numbers me
- Local time
- Today, 04:53
- Joined
- May 30, 2007
- Messages
- 25
First off, I have tried to find an answer but with no luck.
I want my Access DB (2002) to send via e-mail (Outlook) to a number of addresses. The mail will send to the LAST person on the list but not to all people.
Help would be really appreciated:
'------------------------------------------------------------
' To Send an e-mail from Access to a list of users
'------------------------------------------------------------
Function SendE_Mail_Tbl_1120()
Set dbs = CurrentDb
Set rstEmailDets = dbs.OpenRecordset("SELECT * FROM Tbl_1120_New_Position_And_KID_Mail;")
strEmail = Nz(rstEmailDets("Requester_E-Mail_Address"), ";")
On Error GoTo Macro1_Err
DoCmd.SendObject acTable, "Tbl_0040_OM_Team", "MicrosoftExcelBiff8(*.xls)", strEmail, "", "", "New Test (Subject)", "New Test (Body)", False, ""
Macro1_Exit:
Exit Function
Macro1_Err:
MsgBox Error$
Resume Macro1_Exit
End Function
I want my Access DB (2002) to send via e-mail (Outlook) to a number of addresses. The mail will send to the LAST person on the list but not to all people.
Help would be really appreciated:
'------------------------------------------------------------
' To Send an e-mail from Access to a list of users
'------------------------------------------------------------
Function SendE_Mail_Tbl_1120()
Set dbs = CurrentDb
Set rstEmailDets = dbs.OpenRecordset("SELECT * FROM Tbl_1120_New_Position_And_KID_Mail;")
strEmail = Nz(rstEmailDets("Requester_E-Mail_Address"), ";")
On Error GoTo Macro1_Err
DoCmd.SendObject acTable, "Tbl_0040_OM_Team", "MicrosoftExcelBiff8(*.xls)", strEmail, "", "", "New Test (Subject)", "New Test (Body)", False, ""
Macro1_Exit:
Exit Function
Macro1_Err:
MsgBox Error$
Resume Macro1_Exit
End Function