Hi,
I have a ComboBox (languages), ListBox (employees), Command Button (Select) and a Command Button (email).
I choose a language in the ComboBox, click Select and then displays all Employees who speak that language in the listbox. When the listbox MultiSelect property is set to "None", I could only highlight one of the displayed employees and send him/her an email.
My question is how can I include all the employees who speak that language in the "To" part of the email, so I could send one email to all of them? Note: when setting the MultiSelect property to "Simple" or "Extended", the "To" section is blank.
Below is the code used in email_click:
Private Sub cmdMailAgents_Click()
On Error GoTo Err_cmdMailAgents_Click
DoCmd.SendObject acSendNoObject, , , lstLoggedInEmployee.Value, , , cboOtherLanguage & " call", "Please" & _
" call the following subscriber for " & cboOtherLanguage & " call assistance and reply to all to let" & _
" them know." & vbCrLf & vbCrLf & "Name:" & vbCrLf & "Account No.:" & vbCrLf & "Tel:", , True
Exit_cmdMailAgents_Click:
Exit Sub
Err_cmdMailAgents_Click:
Resume Exit_cmdMailAgents_Click
End Sub
Thank you for your help
atalla
I have a ComboBox (languages), ListBox (employees), Command Button (Select) and a Command Button (email).
I choose a language in the ComboBox, click Select and then displays all Employees who speak that language in the listbox. When the listbox MultiSelect property is set to "None", I could only highlight one of the displayed employees and send him/her an email.
My question is how can I include all the employees who speak that language in the "To" part of the email, so I could send one email to all of them? Note: when setting the MultiSelect property to "Simple" or "Extended", the "To" section is blank.
Below is the code used in email_click:
Private Sub cmdMailAgents_Click()
On Error GoTo Err_cmdMailAgents_Click
DoCmd.SendObject acSendNoObject, , , lstLoggedInEmployee.Value, , , cboOtherLanguage & " call", "Please" & _
" call the following subscriber for " & cboOtherLanguage & " call assistance and reply to all to let" & _
" them know." & vbCrLf & vbCrLf & "Name:" & vbCrLf & "Account No.:" & vbCrLf & "Tel:", , True
Exit_cmdMailAgents_Click:
Exit Sub
Err_cmdMailAgents_Click:
Resume Exit_cmdMailAgents_Click
End Sub
Thank you for your help
atalla