Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2006, 08:25 AM
Authorized User
 
Join Date: Sep 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default IIF Condition Issue

Hello Everyone,

I am trying to make edits to a report using the IIF but my problem is it is only working if it is false. So if the condition is false it passes the values but if true it just shows error on the report.

The datasource for this report is being pulled from a stored procedure in SQL...this is a ADP database.

I have tried it two different ways.
Example Format:
1) IIF([testedfield]IS Null,<[True>],<[False]>)
2) IIF([testedfiled]IS Null,<[True]>,IIF([testedfield]IS Null,<[True]>))

Thank you,
John Williams
__________________
Thank you,
John Williams
 
Old September 11th, 2006, 08:42 AM
Authorized User
 
Join Date: Sep 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does it matter if I am testing the false part of the condition?

=IIF([SecShipVia] Is Null, [ShipVia],[SecShipVia])

SecShipVia & ShipVia are being passed into the report by stored procedure.

Also, I am receiving a Circular Reference in the AutoCorrect Field...not for sure if that anything to do with it.

Thank you,
John Williams
 
Old September 11th, 2006, 09:44 AM
Authorized User
 
Join Date: Sep 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I found the problem. The circular reference was referring to the fact that my textbox was named the same thing as the field I was trying to pass in. So renamed the text box and it work!

Thank you,
John Williams





Similar Threads
Thread Thread Starter Forum Replies Last Post
IIf umeshtheone Beginning VB 6 3 June 21st, 2007 12:24 AM
Nested IIF rohit_ghosh Access 5 May 4th, 2007 09:29 AM
Help with IIF Statment Corey Access 2 December 14th, 2006 11:10 AM
count records where condition not true (IIF??) rpeksens Access 3 September 19th, 2003 03:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.