Year - 1

  • Thread starter Thread starter Dimitris Nikolakakis
  • Start date Start date
D

Dimitris Nikolakakis

In a form I have two Text Boxes. In the first the user gives a date. How can
I automatically calculate the the 2nd Text Box to have the date of 1st minus
one year?

eg 1stDATE = 01/01/2005 ------> 2ndDATE = 01/01/2004

thanks in advance
Dimitris
 
Dimitris said:
In a form I have two Text Boxes. In the first the user gives a date.
How can I automatically calculate the the 2nd Text Box to have the
date of 1st minus one year?

eg 1stDATE = 01/01/2005 ------> 2ndDATE = 01/01/2004

thanks in advance
Dimitris

=DateAdd("yyyy", -1, 1stDATE)
 
In a form I have two Text Boxes. In the first the user gives a date. How can
I automatically calculate the the 2nd Text Box to have the date of 1st minus
one year?

eg 1stDATE = 01/01/2005 ------> 2ndDATE = 01/01/2004

Set the second textbox's Control Source to

=DateAdd("yyyy", -1, [1stDate])

Note that 2ndDate should NOT be stored in any table - it should be an
unbound textbox, recalculated as needed.


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Conditional Sum in a Form 7
Age Calculation as of July 1st - any given year 2
format date in table 3
date range query between 2 tables 2
Date Diff Issue 4
Dlookup 7
Date Calc 8
change dates in access 1

Back
Top