Syntax - How to Refer to Field Name Used in Formula in Text Box Data Property

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

Since taking over an Access 2000 project a while back, this issue has been
driving me crazy.

A field - Net Wgt (kg) (Yes, a very bad name for a field, could it
be the problem?) is being used as the data source for a text box in a
detail line, and it has worked work fine. I need, though, to set a floor of
zero, so I have tried this:

=IIf([Net Wgt (kg)]<0,0,[Net Wgt (kg)])

It always returns #Err. What is the proper syntax for using a field name in
a formula, or concanteneated with a text string, in the data source property
of a report text box ??

Many thanks
Mike Thomas
 
Thanks Duane, that was exactly the problem.
Mike Thomas

Duane Hookom said:
Make sure the name of the control is not also the name of a field.

--
Duane Hookom
MS Access MVP
--

Mike Thomas said:
Since taking over an Access 2000 project a while back, this issue has been
driving me crazy.

A field - Net Wgt (kg) (Yes, a very bad name for a field, could it
be the problem?) is being used as the data source for a text box in a
detail line, and it has worked work fine. I need, though, to set a floor
of
zero, so I have tried this:

=IIf([Net Wgt (kg)]<0,0,[Net Wgt (kg)])

It always returns #Err. What is the proper syntax for using a field name
in
a formula, or concanteneated with a text string, in the data source
property
of a report text box ??

Many thanks
Mike Thomas
 
Back
Top