DateAdd Not working

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
 
S

Steve Schapel

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
 
J

John Vinson

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?
 

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

Similar Threads

Append Query 11
DateAdd 5
Start Date comes up twice. 2
DateAdd and Date Format at once 6
DateAdd thought 3
help with date variable in vba 4
Locking/unlocking cells based on column headers 5
DateAdd compile error 1

Top