SteveL13
asked on
How make end date 1 year after start date
I have two date fields on a form. If I enter, for example 7/1/2013 in the start date field I want the end date field to be one year after the start date.
What is the after update code for the start date field?
What is the after update code for the start date field?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
And I had to add
-1
to the end.
-1
to the end.
what exactly do you mean?
this
dateadd("yyyy",1,date())
1/18/2015
dateadd("yyyy",1,date()-1)
1/17/2015
this
dateadd("yyyy",1,date())
1/18/2015
dateadd("yyyy",1,date()-1)
1/17/2015
ASKER
What I mean is if I start with 7/1/2013 and want to end with 6/30/2014 I have to have:
Me.txtEndDate = DateAdd("yyyy", 1, [txtStartDate]) - 1
It works!
Me.txtEndDate = DateAdd("yyyy", 1, [txtStartDate]) - 1
It works!
that is correct...
ASKER