By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,527 Members | 1,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,527 IT Pros & Developers. It's quick & easy.

a "different" conditional report field

P: n/a
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 -

Feb 16 '06 #1
Share this Question
Share on Google+
2 Replies

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


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
as non functioning circular references. Is that confusing enough?

Feb 16 '06 #2

P: n/a
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...

Feb 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.