I am using Microsoft Access and I have a form that when one date (let's call it Date1) is entered by the user and they hit enter immediately right after, I would like Dates 2 and 3 to automatically prefill on the form. Based upon date 1, we need to add 20 days in the future to get Date2 and 40 days in the future to get Date3. Without using the DateAdd function, how would I write this using Visual Basic? Under the OnEnter Event, I've got this code so far:
Private Sub Date3_Enter()
Dim vntFuture40days As Variant
The main problem is Date 2 automatically prefills in like I want, but in order for Date3 to prefill with the correct date, you have to either tab down to that field or hit enter in that field. How do I get around this so that the user hits enter one time only and Date 3 automatically prefills?