C
Chris
Hi!
I'm having issues using the IIf statement a control source
in an unbound text box on my report. Aside from this, my
report works exactly the way I wanted. I hope someone can
help.
My statement is below:
IIf([Storage Location]="Mfg","Manufacturing",IIf([Storage
Location]="Prod Eng","Product Engineering",IIf([Storage
Location]="Cust Svc","Customer Service","R & D")))
"Storage Location" is a text field in the underlying
tables upon which my queries are based. My report is
grouped on this field and I would like to see the full
department name rather than the abbreviation. I had
intended to hide the control for "Storage Location" and
display the unbound text box that had the above statement
as its control source. However, Access keeps giving me
the following message:
"Syntax error in query expression 'First([IIf([Storage
Location]="Mfg","Manufacturing",IIf([Storage Location]
="Prod Eng","Product Engineering",IIf([Storage Location]
="Cust Svc","Customer Service","R & D")))])"
Choosing Help instead of OK at the error prompt only gives
me a grey screen so I can't even get help from Access!
(Help normally works okay).
I can't figure out why the error message puts the 'First
([...]) around my statement and I can't figure out what
I'm missing. I've tried quotes versus no quotes, spaces
versus no spaces, and a few other things and I just can't
see it.
Thanks for any and all help!
I'm having issues using the IIf statement a control source
in an unbound text box on my report. Aside from this, my
report works exactly the way I wanted. I hope someone can
help.
My statement is below:
IIf([Storage Location]="Mfg","Manufacturing",IIf([Storage
Location]="Prod Eng","Product Engineering",IIf([Storage
Location]="Cust Svc","Customer Service","R & D")))
"Storage Location" is a text field in the underlying
tables upon which my queries are based. My report is
grouped on this field and I would like to see the full
department name rather than the abbreviation. I had
intended to hide the control for "Storage Location" and
display the unbound text box that had the above statement
as its control source. However, Access keeps giving me
the following message:
"Syntax error in query expression 'First([IIf([Storage
Location]="Mfg","Manufacturing",IIf([Storage Location]
="Prod Eng","Product Engineering",IIf([Storage Location]
="Cust Svc","Customer Service","R & D")))])"
Choosing Help instead of OK at the error prompt only gives
me a grey screen so I can't even get help from Access!
(Help normally works okay).
I can't figure out why the error message puts the 'First
([...]) around my statement and I can't figure out what
I'm missing. I've tried quotes versus no quotes, spaces
versus no spaces, and a few other things and I just can't
see it.
Thanks for any and all help!