Hello - I have a form that has a field where a follow-up date is entered and an e-mail is generated based on that date to send a reminder e-mail. I have also added a field call FUComplete, which is a yes/no field. I want to have an If-Then statement say "If FUComplete = True then do nothing but If FUComplete = False then [ProjectDate] + 8 days (so the coding will add 8 calender days to the ProjectDate and put it in the FUDateContacted field and generate an e-mail that will be sent again in 8 days). I'd like to do this for the FUComplete field for 8 days past ProjectDate, 12 days, 16 days, 20 days and 24 days. It would also have to look in the table to see who the original e-mail recipient was and put that e-mail name in the EmailRecipient field.
This is the coding that sends the initial reminder e-mail based on the FUDateContacted field:
Private Sub FUDateContacted_AfterUpdate()
Dim appOutLook As Object
Dim MailOutLook As Object
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.To = Me.EmailRecipient 'get the recipient from the form
.Subject = "Project ID:" & Me.ID & ", Street Ref: " & Me.ClientStreet 'get the street and ID from the form
.body = "This is a reminder that you need to make a follow up call to the address in the Subject line today."
.DeferredDeliveryTime = Me.FUDateContacted 'get the date from the form
.Send
End With
Set appOutLook = Nothing
Set MailOutLook = Nothing
End Sub
Is it possible to put the coding for the if/then statements (if this would be the way to do it) in this existing coding? I would so much appreciate help with this.
If this is not possible will someone please tell me up front so I don't keep posting it? Thank you!!
Thank you!!
Laura
This is the coding that sends the initial reminder e-mail based on the FUDateContacted field:
Private Sub FUDateContacted_AfterUpdate()
Dim appOutLook As Object
Dim MailOutLook As Object
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.To = Me.EmailRecipient 'get the recipient from the form
.Subject = "Project ID:" & Me.ID & ", Street Ref: " & Me.ClientStreet 'get the street and ID from the form
.body = "This is a reminder that you need to make a follow up call to the address in the Subject line today."
.DeferredDeliveryTime = Me.FUDateContacted 'get the date from the form
.Send
End With
Set appOutLook = Nothing
Set MailOutLook = Nothing
End Sub
Is it possible to put the coding for the if/then statements (if this would be the way to do it) in this existing coding? I would so much appreciate help with this.
If this is not possible will someone please tell me up front so I don't keep posting it? Thank you!!
Thank you!!
Laura