Good day everyone. Here is my problem. I have a event form with participants information including emails. I made a qry that has their email and send email (Yes/No field) and sent email (Yes/no field). Qry is set up to show if the sent email is not checked off so if sentemail is yes it will not show in the qry. I placed a cmd button on the form to send a specail email to those that have been checked off on the sendEmail check box. The cmd button will loop through the qry and send the emails.
My problem is I want the sentEmail check box to automatically be set to yes when I click on the sendemail cmd button. Here is my current code:
Private Sub Command68_Click()
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Set rsEmail = CurrentDb.OpenRecordset("First Hotel Reg")
Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("EMail").Value
DoCmd.SendObject , , , strEmail, , , "AC Pool & Spa Show Hotel Registration", "Dear 2003 Atlantic City Pool & Spa Show Exhibitor: Once again, we are pleased to offer our exhibitors the opportunity to make your housing reservations for the 2002 Show via the internet at www.nespapool.org. Click on the link, then on AC Show, then on Exhibitor Housing Reservations On-line. Here is your code - spagen0103. Only exhibiting companies who have submitted their space application have received this information and therefore you have first choice for all hotels. Please take advantage of this opportunity and reserve your rooms quickly, as the site opens to attendees beginning October 16. If you do not wish to make your reservations on-line call (732)972-9111 give us your exhibitor access code and have Housing Reservation form faxed to you. Follow the instructions and mail/fax to AC Housing Bureau. Numbers/Address on form. Exhibitor badge reg. info. will be forwarded to you within a few weeks", False
rsEmail.MoveNext
Loop
Set rsEmail = Nothing
me.sentemail = -1
me.sendemail = 0
End Sub
What happens is that the check boxes change but the email is not sent. I'm stuck here. Any help will be great.
Thanks Al.
My problem is I want the sentEmail check box to automatically be set to yes when I click on the sendemail cmd button. Here is my current code:
Private Sub Command68_Click()
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Set rsEmail = CurrentDb.OpenRecordset("First Hotel Reg")
Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("EMail").Value
DoCmd.SendObject , , , strEmail, , , "AC Pool & Spa Show Hotel Registration", "Dear 2003 Atlantic City Pool & Spa Show Exhibitor: Once again, we are pleased to offer our exhibitors the opportunity to make your housing reservations for the 2002 Show via the internet at www.nespapool.org. Click on the link, then on AC Show, then on Exhibitor Housing Reservations On-line. Here is your code - spagen0103. Only exhibiting companies who have submitted their space application have received this information and therefore you have first choice for all hotels. Please take advantage of this opportunity and reserve your rooms quickly, as the site opens to attendees beginning October 16. If you do not wish to make your reservations on-line call (732)972-9111 give us your exhibitor access code and have Housing Reservation form faxed to you. Follow the instructions and mail/fax to AC Housing Bureau. Numbers/Address on form. Exhibitor badge reg. info. will be forwarded to you within a few weeks", False
rsEmail.MoveNext
Loop
Set rsEmail = Nothing
me.sentemail = -1
me.sendemail = 0
End Sub
What happens is that the check boxes change but the email is not sent. I'm stuck here. Any help will be great.
Thanks Al.