DateAdd Not working

  • Thread starter Thread starter mossie
  • Start date Start date
M

mossie

I am having this problem where I want to take the start date and add 6
months to it and then write the result in another field, the
ReviewDate.

The syntax I am using is the following.

ReviewDate: DateAdd("m",6,[StartDate])

Bit when I enter the start date or just change it nothing happens. No
error message or anything.

Does anyone have any ideas what I might be doing wrong?

Regards
Hamish
 
Hamish,

I assume the expression...
ReviewDate: DateAdd("m",6,[StartDate])
.... is a calculated field in a query? The expression appears to be
correct. What is displayed in this field if you view the query
datasheet?

- Steve Schapel, Microsoft Access MVP
 
I am having this problem where I want to take the start date and add 6
months to it and then write the result in another field, the
ReviewDate.

Why?

If the ReviewDate can always be calculated from the start date,
there's no valid reason to store it in ANY table field. You can, and
probably should, simply calculate it on the fly in a Query. This
calculated field can be used for search criteria, for sorting, for
export, for display - anything you can do with a table field except
edit it.

Only if you DO want to edit it - i.e. if the default review date is
six months hence but is subject to change in some cases - is there any
reason to store it.
The syntax I am using is the following.

ReviewDate: DateAdd("m",6,[StartDate])

Where do you have this? What's the context?
 
Back
Top