Adding 3 years from a date entered in a field

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
 
D

Douglas J. Steele

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])
 
P

pompeyboyUSA

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
 
D

Douglas J. Steele

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
 
G

Guest

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 ?
 
P

pompeyboyUSA

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
 

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

Top