Date Field to AutoPopulate other date fields to futrue date

demicay2669

Registered User.
Local time
Today, 10:26
Joined
Aug 22, 2013
Messages
39
I'm not very good at coding. And I'm having issues figuring out the right code to use. I'm trying to get my "IncidentDate" field to autopopulate two other date fields to a few days from the "IncidentDate". The other two date fields are "ContainDueDate" and "RootDueDate". I'm trying to accomplish this on my "Test CAP Form"

I tried using the following in the BeforeUpdate of "ContainDueDate" and received a complier error: expected =
Code:
DateAdd(d,2,[IncidentDate])
so I removed the parenthesis and nothing happened
Code:
DateAdd d,2,[IncidentDate]
I even tried redoing it in the AfterUpdate of "IncidentDate" and nothing happened either
Code:
DateAdd d,2,[ContainDueDate]

I'm not sure if I'm even using the right function to get what I want.
I would really appreciate any help. :)
Database Attached.
 

Attachments

More like:

Me.OtherDate = DateAdd("d",2,[IncidentDate])
 
Paul's code, with the quotation marks around the d, is the correct DateAdd() syntax, and you do, indeed, need to assign values to ContainDueDate and RootDueDate by putting that code in the IncidentDate_AfterUpdate event.

Linq ;0)>
 
Sorry it took me so long to get back, i had a four day weekend.
I just tried that code and it worked perfectly Thank you very much Paul and Linq.
 

Users who are viewing this thread

Back
Top Bottom