Hi there,
I've searched the FAQ's and found hundreds of suggestions on how to automatically email using Outlook, but we use Groupwise at our company.
I have an Access query set up that will generate a list of new events and the contact email for the events that I have used to create a form. I have a command button that will run the following code when clicked:
Private Sub cmdEmail_Click()
Dim email, notes As String
Dim intCounter As Integer
email = Me.CONTACT_EMAIL_ADDRESS
notes = "Dear Event Organizer:" & Chr(13) & Chr(13)
notes = notes & "We appreciate your information regarding: " & Chr(13)
notes = notes & Me.Event_Name & " " & Me.Event_date
notes = notes & Chr(13) & Chr(13)
notes = notes & "We will update our calendar with this information." & Chr(13)
notes = notes & "If you need further help with registering, please call 555-555-5555 and we will walk you through the process."
notes = notes & Chr(13) & Chr(13)
notes = notes & "Yourtown Community Info"
DoCmd.SendObject , , , email, , , "New Event - " & Me.EVENT_NAME, notes, False
End Sub
However, this only send out one email. I tried getting it to loop (intCounter variable) but Access keeps crashing with the loop in there (IPF, Kernal 32). Any suggestions on how to get it to loop through the form and generate an email for each recipient in the query list?
Thanks!
MTBChik
I've searched the FAQ's and found hundreds of suggestions on how to automatically email using Outlook, but we use Groupwise at our company.
I have an Access query set up that will generate a list of new events and the contact email for the events that I have used to create a form. I have a command button that will run the following code when clicked:
Private Sub cmdEmail_Click()
Dim email, notes As String
Dim intCounter As Integer
email = Me.CONTACT_EMAIL_ADDRESS
notes = "Dear Event Organizer:" & Chr(13) & Chr(13)
notes = notes & "We appreciate your information regarding: " & Chr(13)
notes = notes & Me.Event_Name & " " & Me.Event_date
notes = notes & Chr(13) & Chr(13)
notes = notes & "We will update our calendar with this information." & Chr(13)
notes = notes & "If you need further help with registering, please call 555-555-5555 and we will walk you through the process."
notes = notes & Chr(13) & Chr(13)
notes = notes & "Yourtown Community Info"
DoCmd.SendObject , , , email, , , "New Event - " & Me.EVENT_NAME, notes, False
End Sub
However, this only send out one email. I tried getting it to loop (intCounter variable) but Access keeps crashing with the loop in there (IPF, Kernal 32). Any suggestions on how to get it to loop through the form and generate an email for each recipient in the query list?
Thanks!
MTBChik