Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old February 16th, 2006, 05:05 PM
JC
Guest
 
Posts: n/a
Default a "different" conditional report field

I am trying to conditionally print a field on a report based on the
value of another field in the query that the report is based on.
In the Control Source for SerialB I have typed:
= IIF(nz(QtyB) > 0," ",SerialB)
On preview of the report I get #Error in that field every time QtyB is
NOT greater than 0.
If I change the code to read:
= IIF(nz(QtyB) > 0," ","9")
the blank shows up where it should and the 9 shows up where it should.

Can someone please tell me how to make this work? Thanks
- jc -




  #2  
Old February 16th, 2006, 08:35 PM
Bill (The Original)
Guest
 
Posts: n/a
Default Re: a "different" conditional report field

Create a field in the query using your formula.
e.g., createdfield: = IIF(nz(QtyB) > 0," ",SerialB).
Then use createdfield in the report.

Or

Put SerialB in the report and hide it from view.
(Make the box tiny or change the font color)

If you refer to SerialB in a formula as its control source in a report,
then you must have SerialB somewhere else in the report for the formula
to reference. Formulas with self referential components generally end
up
as non functioning circular references. Is that confusing enough?

  #3  
Old February 17th, 2006, 12:45 PM
JC
Guest
 
Posts: n/a
Default Re: a "different" conditional report field

Bill, Thank you! Adding the created fields in the underlying query
worked GREAT! - BUT - I could not get the other solution to work. I
tried putting both fields on the report, but it still gave the #Error.
I understand what you are saying about self referential components, but
it does seem like it "ought" to work. No matter - I am moving on since
you have given me a solution that works. Thanks again.

- jc -
PS - I LOVE this forum. - so much knowledge right at my fingertips...

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.