Update the Date Field

  • Thread starter Thread starter Chris Peikert
  • Start date Start date
C

Chris Peikert

I am trying to create a form that has 2 date fields. Court Date, and Due
Date. The Court Date is just a basic Date field, but when I exit that field
or enter into the Due Date field I want the Due Date field to be the Court
Date + 45 Days and update automatically. How do I do this. I found an
expression to build using DateAdd ( "d", 45, "date"). I don't know what to
put in for the Date. I tried pointing it to the Court Date field but it does
nothing. Any help would be much appreciated.
 
If you name the two text boxes containing the fields txtCourtDate and
txtDueDate and format both as dates, you might use this code that will
execute after you enter a value for court date.

Private Sub txtCourtDate_AfterUpdate()
Me.txtDueDate = Me.txtCourtDate + 45
End Sub
 
Back
Top