Matt Greatorex
Registered User.
- Local time
- Yesterday, 22:39
- Joined
- Jun 22, 2005
- Messages
- 1,019
I've been searching the forum for a while, so hopefully I haven't missed the answer to this one. It may sound like a small problem, but it's driving me mad.
I have a series of TextBoxes on a Form.
Two of these are named 'Department' and 'Shift'.
Originally, the ControlSource for the former was 'Department' and for the latter was 'Shift', both from the same source table.
All data was being displayed without any problems (any null values resulting in an empty field).
I altered the ControlSource on each to read:
=IIf(IsNull([Department]),"Unknown",[Department])
and
=IIf(IsNull([Shift]),"Unknown",[Shift])
The Shift field works as I'd hoped it would, but the Department field displays '#Error', whether there is a value or not.
I've tried deleting the problematic TextBox, then recreating it by copying and pasting from one that works (in case there was some setting I was missing). In this case, the only difference between the two is the source field, but given that using the source on it's own doesn't present any problems, I'm at a loss.
This same problem occurs on a small number of other Forms, as well as on certain Reports.
Any thoughts welcome.
I have a series of TextBoxes on a Form.
Two of these are named 'Department' and 'Shift'.
Originally, the ControlSource for the former was 'Department' and for the latter was 'Shift', both from the same source table.
All data was being displayed without any problems (any null values resulting in an empty field).
I altered the ControlSource on each to read:
=IIf(IsNull([Department]),"Unknown",[Department])
and
=IIf(IsNull([Shift]),"Unknown",[Shift])
The Shift field works as I'd hoped it would, but the Department field displays '#Error', whether there is a value or not.
I've tried deleting the problematic TextBox, then recreating it by copying and pasting from one that works (in case there was some setting I was missing). In this case, the only difference between the two is the source field, but given that using the source on it's own doesn't present any problems, I'm at a loss.
This same problem occurs on a small number of other Forms, as well as on certain Reports.
Any thoughts welcome.