Adding 3 years from a date entered in a field

  • Thread starter Thread starter pompeyboyUSA
  • Start date Start date
P

pompeyboyUSA

Is it possible to enter a date in one field and have it auto calculated 3
years in the future and added into a different field?

Thank you

Charlie
 
It can be done, but it shouldn't be.

Instead, create a query, and put a calculated field in that query that does
the calculation. Use the DateAdd function:

DateAdd("yyyy", 3, [NameOfDateField])
 
Thanks Doug,

where abouts would that function go in the query?

Charlie

Douglas J. Steele said:
It can be done, but it shouldn't be.

Instead, create a query, and put a calculated field in that query that does
the calculation. Use the DateAdd function:

DateAdd("yyyy", 3, [NameOfDateField])

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


pompeyboyUSA said:
Is it possible to enter a date in one field and have it auto calculated 3
years in the future and added into a different field?

Thank you

Charlie
 
Put it in the Field row of an empty column in the grid.

If all you do is type that expression (DateAdd("yyyy", 3,
[NameOfDateField])) into the cell, Access will assign it a field name along
the lines of Expr1. To give it a meaningful name, put the name (followed by
a colon) in front of that expression:

FutureDate: DateAdd("yyyy", 3, [NameOfDateField])

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


pompeyboyUSA said:
Thanks Doug,

where abouts would that function go in the query?

Charlie

Douglas J. Steele said:
It can be done, but it shouldn't be.

Instead, create a query, and put a calculated field in that query that
does
the calculation. Use the DateAdd function:

DateAdd("yyyy", 3, [NameOfDateField])

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


pompeyboyUSA said:
Is it possible to enter a date in one field and have it auto calculated
3
years in the future and added into a different field?

Thank you

Charlie
 
Impossible d'envoyer le message. Le paramètre d'authentification n'est
peut-être pas correct pour votre serveur de messagerie pour courrier
sortant. Pour résoudre ce problème, recherchez la rubrique d'aide «
Dépannage de Windows Mail » et lisez la section « J'ai des problèmes pour
envoyer des messages électroniques ». Si vous avez besoin d'assistance pour
déterminer les paramètres corrects du serveur, contactez votre fournisseur
de services de messagerie.

que je dois faire merci ?
 
Doug, Works like a dream, thank you very much

Charlie

Douglas J. Steele said:
Put it in the Field row of an empty column in the grid.

If all you do is type that expression (DateAdd("yyyy", 3,
[NameOfDateField])) into the cell, Access will assign it a field name along
the lines of Expr1. To give it a meaningful name, put the name (followed by
a colon) in front of that expression:

FutureDate: DateAdd("yyyy", 3, [NameOfDateField])

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


pompeyboyUSA said:
Thanks Doug,

where abouts would that function go in the query?

Charlie

Douglas J. Steele said:
It can be done, but it shouldn't be.

Instead, create a query, and put a calculated field in that query that
does
the calculation. Use the DateAdd function:

DateAdd("yyyy", 3, [NameOfDateField])

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Is it possible to enter a date in one field and have it auto calculated
3
years in the future and added into a different field?

Thank you

Charlie
 
Back
Top