#name error

K

kashi

i always get #name?? error when am trying to do something with
dates...
like date difff or date add
when i have this expression in the control sourse
eg: review date-1=dateadd("m",[evaluation period-1],[hire date])
can anyone help me
please
 
D

Dirk Goldgar

In
kashi said:
i always get #name?? error when am trying to do something with
dates...
like date difff or date add
when i have this expression in the control sourse
eg: review date-1=dateadd("m",[evaluation period-1],[hire date])
can anyone help me
please

Are you saying that your controlsource expression is:

review date-1=dateadd("m",[evaluation period-1],[hire date])

? That would be wrong, since you can't use an assignment statement in a
controlsource.

Or are you saying that the controlsource of [review date-1] is

=dateadd("m",[evaluation period-1],[hire date])

and that is giving you an error? If so, it's probably because [review
date-1] is the name of a field in your form's recordsource. A
calculated control can't have the same name as a a field in the form's
recordsource. You can't use this method to store a calculated value in
the underlying field. You shouldn't normally want to do that, anyway --
if the value can always be calculated by the expression, then you
shouldn't ever store it. Instead, you should just calculate it whenever
you need it.
 

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