Date calculation from one field to store in another

G

Guest

I have a table "Appraisals" with amongst others two fields, one called
Appraisal_Reminder and the other Appraisal_Due. In the input form I would
like for the Appraisal_Due to be the date in the Appraisal_reminder + 14 days
so that when the user input 01/03/2007 in the Appraisal_Reminder field the
Appraisal_Due field is populated with 14/03/2007 automatically and then the
focus go the next field.
I have come across some code which add date but I am a little stuck as the
syntax in my case would be DateAdd(day, 14, date) but instead of have a date
I would like it to be the value in the Appraisal_Reminder field.
Has anyone come across this and would be able to help with coding this?
Thank you for your reply.
 
A

Allen Browne

In the AfterUpdate event procedure of the Appraisal_Date text box on your
form:

Me.[Appraisal_reminder] = DateAdd("d", 15, [Appraisal_Due])
 

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