Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Conversion / March 2008

Tip: Looking for answers? Try searching our database.

A97 to A2003 & IIf

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill B - 21 Feb 2008 14:12 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.