A97 to A2003 & IIf

B

Bill B

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
 
G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Conditional error 1

Top