Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a date out 1 year 2

Status
Not open for further replies.

bigdogtech

IS-IT--Management
Jul 12, 2006
3
US
Trying to have a start date of Ex: 1/06/06 and have a end date of 1/6/07. I want it so when you enter in the start date a field populates with a end date one year later.
 
In the On Exit event of your start date field, add the following line of code...

Code:
Me.EndDateField.Value = DateAdd("yyyy", 1, CDate(Me.StartDateField.Value))
 
Tried that bt it says can't find macr, do I need to create a macro for it?
 
i think it should be:
Me!EndDateField.Value =
DateAdd("yyyy", 1, CDate(Me!StartDateField.Value))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top