If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Add Function on Forms
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. |
#2
|
|||
|
|||
Date Add Function on Forms
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 -- Daryl S "Mike" wrote: 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. |
Thread Tools | |
Display Modes | |
|
|