Guest_imported
New member
- Jan 1, 1970
- 0
Hi:
My table has a field I'll call "pet" which is populated via
a VALUE LIST. In my REPORT, I want to print the value if
it is a DOG or CAT, but print nothing (NULL) if it is one
of the other values in the value list.
Originally, the control in the report was a combo box,
and the report was not printing the field at all, no
matter what the value was. Then I changed it to a TEXT
BOX in the report, and have the following expression
set in the control source:
=iif([pet] in ("dog","cat",[pet],Null)
My result in the report is #ERROR
I don't know if its just a SYNTAX problem, or if for
some reason you cant use a calculated cotrol or iif statement
when dealing with data that was in a value list in the table.
I have varied the syntax ("" instead of Null, etc) but it
looks like whenever the fieldname "pet" is used with the =
sign, it fails. Only "pet" alone WORKS.
I am clueless. Acces Help and the Access 200 Bible doesn't
say anything about this.
Help?
Thanks,
Lou
My table has a field I'll call "pet" which is populated via
a VALUE LIST. In my REPORT, I want to print the value if
it is a DOG or CAT, but print nothing (NULL) if it is one
of the other values in the value list.
Originally, the control in the report was a combo box,
and the report was not printing the field at all, no
matter what the value was. Then I changed it to a TEXT
BOX in the report, and have the following expression
set in the control source:
=iif([pet] in ("dog","cat",[pet],Null)
My result in the report is #ERROR
I don't know if its just a SYNTAX problem, or if for
some reason you cant use a calculated cotrol or iif statement
when dealing with data that was in a value list in the table.
I have varied the syntax ("" instead of Null, etc) but it
looks like whenever the fieldname "pet" is used with the =
sign, it fails. Only "pet" alone WORKS.
I am clueless. Acces Help and the Access 200 Bible doesn't
say anything about this.
Help?
Thanks,
Lou