Expression

  • Thread starter Thread starter RipperT
  • Start date Start date
R

RipperT

I have two simple date fields and want to calculate the
number of days between dates entered in them. I am using
the following expression in the "control source" box of a
form field to do this:

=DateDiff([d],[Start_date],[Rel_date])

where 'Start_date' and 'Rel_date' are the two dates to
use. I copied this expression right out of the Access
help file and it gives me a #name? error in the field.
What does that mean?
Thanx,
Rip.
 
I have two simple date fields and want to calculate the
number of days between dates entered in them. I am using
the following expression in the "control source" box of a
form field to do this:

=DateDiff([d],[Start_date],[Rel_date])

where 'Start_date' and 'Rel_date' are the two dates to
use. I copied this expression right out of the Access
help file and it gives me a #name? error in the field.
What does that mean?
Thanx,
Rip.

1) You have miss-written the function.
You must surround the [d] with quotation marks, i.e. "d", not
brackets.
=DateDiff("d",[Start_date],[Rel_date])

2) Make sure the name of the control is not the same as the name of
one of the fields used in the expression.
 
Thanx, man, that did it.

Rip
-----Original Message-----
I have two simple date fields and want to calculate the
number of days between dates entered in them. I am using
the following expression in the "control source" box of a
form field to do this:

=DateDiff([d],[Start_date],[Rel_date])

where 'Start_date' and 'Rel_date' are the two dates to
use. I copied this expression right out of the Access
help file and it gives me a #name? error in the field.
What does that mean?
Thanx,
Rip.

1) You have miss-written the function.
You must surround the [d] with quotation marks, i.e. "d", not
brackets.
=DateDiff("d",[Start_date],[Rel_date])

2) Make sure the name of the control is not the same as the name of
one of the fields used in the expression.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top