Create a calculated date in a field on input form

  • Thread starter Thread starter Steve in S.F.
  • Start date Start date
S

Steve in S.F.

I need to create an input form in which there is a field for the user to
input a year. After the user enters a year I would like a date to appear in
another field. The date would always be the same month and day (June 1) and
the year would be six years before the date entered in the Year field.

So for example if the user enters "2010" in the Year field, the calculated
Date Field would show: 06/01/2004.

Is there some formula (I guess using some date function) that I can use in
the Control Source property of the Date Field that would yield the date that
I need? Or any other method to get this result?

Thanks,

Steve
 
Steve said:
I need to create an input form in which there is a field for the user to
input a year. After the user enters a year I would like a date to appear in
another field. The date would always be the same month and day (June 1) and
the year would be six years before the date entered in the Year field.

So for example if the user enters "2010" in the Year field, the calculated
Date Field would show: 06/01/2004.

Is there some formula (I guess using some date function) that I can use in
the Control Source property of the Date Field that would yield the date that
I need? Or any other method to get this result?


=DateSerial(YearField - 6, 6, 1)
 
Thanks so much - I don't even find that function in help for either Access or
Excel, but it definitely works!
 
Open a module and click on help. It will give you VBA information that
contains things like this.
 
I should have thought of that -- Thanks!

Mike Painter said:
Open a module and click on help. It will give you VBA information that
contains things like this.
 
Back
Top