Using DateAdd

G

Guest

I have read other posts about using DataAdd but have not been able to get it to work

I have a table with 2 fields, last report & next report, both Date/Time Medium format

I have tried using =DateAdd("m", 12, [last report]) to get the "next report" field populated with a date a year after the "last report" date

What's the best way to do this? Via a query? Can I have the "next report" field of the table automatically filled as soon as the "last report" field is filled with a dat

Jorge
 
S

Sandra Daigle

Hi Jorge,

I would go with the Year interval and do something like this:

dateadd("yyyy",1,[last report])

This should really be done in a query rather than stored since the next
report date is a derived value. Just put the expression into the first cell
of an empty column in the query designer.
 
S

Sandra Daigle

Sorry, hit send before I was finished - here is what goes in the first cell
of the empty column in the query designer:

NextReport: DateAdd("yyyy",1,[last report])


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Sandra said:
Hi Jorge,

I would go with the Year interval and do something like this:

dateadd("yyyy",1,[last report])

This should really be done in a query rather than stored since the next
report date is a derived value. Just put the expression into the first
cell of an empty column in the query designer.



Jorge said:
I have read other posts about using DataAdd but have not been able to get
it to work.

I have a table with 2 fields, last report & next report, both Date/Time
Medium format.

I have tried using =DateAdd("m", 12, [last report]) to get the "next
report" field populated with a date a year after the "last report" date.

What's the best way to do this? Via a query? Can I have the "next report"
field of the table automatically filled as soon as the "last report"
field is filled with a dat?

Jorge
 

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