Hello! I'm having some technical difficulties and would love your expertise - I have a form built where there is a date field in one section that has the date of the request put in it called ProjectDate. Then in another section for following up I have it set up so that an e-mail address is entered then the next field is the date for the follow-up call (FUDateContacted) - when this is entered it generates an e-mail that goes to the sales person on the date the follow-up call is to be made. That works perfectly.
The customer is now asking if the follow-up date can be automatically filled in to be 4 days after the request date. I know there is coding that needs to be added to the existing coding but I have no idea how it should go. Here is the coding to make the e-mail get sent when the follow-up date is entered:
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
How can I have this field look at the ProjectDate field and add four days to it and then have the follow-up e-mail sent on the calculated date?
Thanks tons for any help
Laura
The customer is now asking if the follow-up date can be automatically filled in to be 4 days after the request date. I know there is coding that needs to be added to the existing coding but I have no idea how it should go. Here is the coding to make the e-mail get sent when the follow-up date is entered:
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
How can I have this field look at the ProjectDate field and add four days to it and then have the follow-up e-mail sent on the calculated date?
Thanks tons for any help
Laura