default Date value

  • Thread starter Thread starter Liz Hansen
  • Start date Start date
L

Liz Hansen

Hello,

I have a form which 2 date fields. The user will either type in a date or
select a date from a calendar.

I was hoping I could put something in the "After Update" event on this field
to automatically populate the second field like such:

If the user types in 01/01/03 the automatic default date in the second field
should be 01/01/04 (one year later).

Is this possible?

Thanks,

Liz
 
Liz Hansen said:
Hello,

I have a form which 2 date fields. The user will either type in a date or
select a date from a calendar.

I was hoping I could put something in the "After Update" event on this field
to automatically populate the second field like such:

If the user types in 01/01/03 the automatic default date in the second field
should be 01/01/04 (one year later).

In the AfterUpdate event of the first date TextBox...

Me.SecondTextBoxName = DateAdd("yyyy", 1, Me.FirstTextBoxName)
 
Works great!

Thanks,


Rick Brandt said:
In the AfterUpdate event of the first date TextBox...

Me.SecondTextBoxName = DateAdd("yyyy", 1, Me.FirstTextBoxName)
 
Back
Top