469,575 Members | 1,662 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

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 -

Feb 16 '06 #1
2 1306
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
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.

Similar topics

9 posts views Thread by /* frank */ | last post: by
8 posts views Thread by TTroy | last post: by
3 posts views Thread by Jukka K. Korpela | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.