Help !!!

mjf_q8

Registered User.
Local time
Today, 15:28
Joined
Mar 26, 2007
Messages
18
I design a form to send the email to a multiple lists (by selecting the users) - Attached the example.
How can I send the email to all users on the list?
Appreciate your help.
 

Attachments

this first way is to not upload a 2007 database. can't open it. ;)
 
I don't have Access 07 either, however the code here may help you, I'm sure the syntax should be quite similar.
 
Please find attached a snapshot of the form and find below the VB code I used.

Top Observers Listbox
Private Sub MailTo1_Click()
Dim varItem As Variant
Dim strList As String
With Me!MailTo1
If .MultiSelect = 0 Then
Me!txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & ";"
Next varItem
strList = left$(strList, Len(strList) - 1)
Me!txtSelected = strList
End If
End With
End Sub

Send Button
Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click
Dim strEmail As String
Dim strMailSubject As String
Dim strMsg As String
strEmail = Me.txtSelected & vbNullString
strMailSubject = Me.txtMailSubject & vbNullString
strMsg = Me.txtMsg & vbNullString
Me.cmdEmail.Enabled = True
DoCmd.SendObject , , To:=strEmail, Subject:=strMailSubject, MessageText:=strMsg
Exit_cmdEmail_Click:
Exit Sub
Err_cmdEmail_Click:
MsgBox "Email disconnected"
Resume Exit_cmdEmail_Click
End Sub

I want to send the email for all emails on the list?

Appreciate your help.
 

Attachments

  • Form.JPG
    Form.JPG
    39.4 KB · Views: 124
Your code looks like it will work for all of those selected. Are you saying you want a way to ALSO be able to send to EVERYONE, not just those selected?
 

Users who are viewing this thread

Back
Top Bottom