H
Howard Brody
Build a form with three TextBoxes: [txtName], [txtArrive],
[txtExpire]. In the LostFocus event for [txtArrive] use
the following code:
Private Sub txtArrive_LostFocus()
Dim dtArr as Date
Dim dtExp as Date
dtArr = [txtArrive]
dtExp = DateSerial(Year(dtArr) + 2, Month(dtArr), Day
(dtArr))
[txtExpire] = dtExp
End Sub
Check the Help file for DateSerial. It's a useful function
and I use it often.
Hope this helps!
Howard Brody
[txtExpire]. In the LostFocus event for [txtArrive] use
the following code:
Private Sub txtArrive_LostFocus()
Dim dtArr as Date
Dim dtExp as Date
dtArr = [txtArrive]
dtExp = DateSerial(Year(dtArr) + 2, Month(dtArr), Day
(dtArr))
[txtExpire] = dtExp
End Sub
Check the Help file for DateSerial. It's a useful function
and I use it often.
Hope this helps!
Howard Brody