S
Swordfish
Good Everyone,
My question of the day: I am using Lotus Notes as a mail client and
therefore am using it to send email in Access. Per the coding below when I
select a name in the combo box named Production Assigned, it creates a new
email and enters the email address in the To: field. The email addresses are
located in a table called Benefits Employee.
How can I add to the coding below to include another combo box named QA, to
send in the same email, on the To: field. The names from the drop down are
located in the Table QAassigned (row source coding below). The e-mail
addresses for QA are also located in the Benefits Employee.
Thank you for any assistance
QA row source: SELECT tblQAassigned.QAassignedID, tblQAassigned.LastName &
", " & [FirstName] AS Expr1, tblQAassigned.FirstName FROM tblQAassigned ORDER
BY tblQAassigned.LastName & ", " & [FirstName] WITH OWNERACCESS OPTION;
Private Sub SendEmail_Click()
Dim SendTo As String
SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
Call ComposeNotesMemo(SendTo, "ProductionAssigned and QA Assigned", "The
following DataTRAK NUMBER has been assigned to you:" & Me.Datatrak_Number)
End Sub
Public Sub ComposeNotesMemo(SendTo As String, Subject As String, body As
String)
Dim sess As Object, ws As Object, uidoc As Object
Dim mailServer As String, mailFile As String
Set sess = CreateObject("Notes.NotesSession")
Set ws = CreateObject("Notes.NotesUiWorkspace")
mailServer = sess.GetEnvironmentString("MailServer", True)
mailFile = sess.GetEnvironmentString("MailFile", True)
Set uidoc = ws.ComposeDocument(mailServer, mailFile, "Memo")
Call uidoc.FieldSetText("EnterSendTo", SendTo)
Call uidoc.FieldSetText("Subject", Subject)
uidoc.GotoField ("Body")
uidoc.InsertText (body)
AppActivate (uidoc.WindowTitle)
End Sub
My question of the day: I am using Lotus Notes as a mail client and
therefore am using it to send email in Access. Per the coding below when I
select a name in the combo box named Production Assigned, it creates a new
email and enters the email address in the To: field. The email addresses are
located in a table called Benefits Employee.
How can I add to the coding below to include another combo box named QA, to
send in the same email, on the To: field. The names from the drop down are
located in the Table QAassigned (row source coding below). The e-mail
addresses for QA are also located in the Benefits Employee.
Thank you for any assistance
QA row source: SELECT tblQAassigned.QAassignedID, tblQAassigned.LastName &
", " & [FirstName] AS Expr1, tblQAassigned.FirstName FROM tblQAassigned ORDER
BY tblQAassigned.LastName & ", " & [FirstName] WITH OWNERACCESS OPTION;
Private Sub SendEmail_Click()
Dim SendTo As String
SendTo = DLookup("[EmailAddress]", "tblBenefitsEmployee", "[EmployeeID] =
" & Me.Productionassignedname)
Call ComposeNotesMemo(SendTo, "ProductionAssigned and QA Assigned", "The
following DataTRAK NUMBER has been assigned to you:" & Me.Datatrak_Number)
End Sub
Public Sub ComposeNotesMemo(SendTo As String, Subject As String, body As
String)
Dim sess As Object, ws As Object, uidoc As Object
Dim mailServer As String, mailFile As String
Set sess = CreateObject("Notes.NotesSession")
Set ws = CreateObject("Notes.NotesUiWorkspace")
mailServer = sess.GetEnvironmentString("MailServer", True)
mailFile = sess.GetEnvironmentString("MailFile", True)
Set uidoc = ws.ComposeDocument(mailServer, mailFile, "Memo")
Call uidoc.FieldSetText("EnterSendTo", SendTo)
Call uidoc.FieldSetText("Subject", Subject)
uidoc.GotoField ("Body")
uidoc.InsertText (body)
AppActivate (uidoc.WindowTitle)
End Sub