2 date fields want 2nd field to get updated +10 days when 1st fie.

M

Michael Dane

Once the 1st. field is entered want 2nd. field to update +10 days but also
update that field in the table it is in.
 
A

Allen Browne

In your form, use the AfterUpdate event procedure of the first control to
assign a value to the 2nd control.

This example assumes 2 text boxes, with control source of HireDate and
ReturnDue respectively.

Private Sub HireDate_AfterUpdate()
Me.[ReturnDue] = DateAdd("d", 10, Me.HireDate)
End Sub

We are assuming here that you want it to default to 10 days later, but there
are times where you want to change that (e.g. to give an extension). If it
should *always* be exactly 10 days later, then don't store the date: use a
calculated field instead. Details of how and when to do that in:
Calculated Fields
at:
http://members.iinet.net.au/~allenbrowne/casu-14.html
 

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