Hi All
I have a report that is throwing an error on a text field field. below is
the condition. I'm thinking the 'In' condition is causing the problem and I
can't seem to find anything with google regarding the use of 'In' in a VBA
IIF statement.
=IIf([test_typ]="TENS" And [shape]="RECT" And [thick]<=0.16 And [testmeth]
In ("48","41","42","43","44") And Not ([prod_fac] In ("LAB","2XX","3XX"))
And Not ([sps] In
("1156","1189","1203","1209","1227","1235","1165","2507","2541","2546","2547")),
"ROBOTIC",IIf([Shape]="JIS","JIS",IIf([Shape]="API","API","")))
Any suggestions??
Bill
david@epsomdotcomdotau - 01 Mar 2008 06:21 GMT
That does not appear to be a VBA IIF statement. It appears
to be a control source. If it is a VBA IIF statement, split it
into a an If Then Else statement, and find that part that is failing.
If it is a control source, split it into several controls and see
which part is failing. My bet would be on one of the [] values:
A2003 is less flexible with those references than any previous
version.
I don't see anything wrong with any of the IN conditions, but
split it up into sections and see where it fails.
(david)
> Hi All
>
[quoted text clipped - 6 lines]
> In ("48","41","42","43","44") And Not ([prod_fac] In ("LAB","2XX","3XX"))
> And Not ([sps] In
("1156","1189","1203","1209","1227","1235","1165","2507","2541","2546","2547
")),
> "ROBOTIC",IIf([Shape]="JIS","JIS",IIf([Shape]="API","API","")))
>
> Any suggestions??
>
> Bill