Date Add Function on Forms

M

Mike

I'm using access to help with workflow operations.
I have a date field called "Fom 16 Signed" which is self explanatory.
I then have a field called "Form 17 Due" This is due within 7 days of the
above Form 16 being signed, so in access I want to create a date based on the
date in an exiting field + 7 days. Dead easy in excel, but cant get round it
in access.
In the default value I have typed;
DateAdd("d","7","[Date Form 16 Signed]") but keep getting syntax errors.
I'm at my wits end, until somone mentioned these forums, so here goes.
i hope you can help.
 
D

Daryl S

Mike -

In the AfterUpdate event of the Form 16 Signed control, add this code:

Me.[Form 17 Due] = DateAdd("d",7,Me.[Date Form 16 Signed])

Every time the control Form 16 Signed is changed, the Form 17 Due will be
updated as well.
If you only want it updated if Form 17 Due is null, then use this:

If Me.[Form 17 Due] Is Null Then
Me.[Form 17 Due] = DateAdd("d",7,Me.[Date Form 16 Signed])
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top