473,326 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

a "different" conditional report field

JC
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 1442
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?

Feb 16 '06 #2
JC
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
4
by: jr | last post by:
I am working in VC++ so this may be microsoft specific though I don't think so. Excuse me if it is. Assuming it isn't, can someone generally explain the purpose of having both - is it purely a...
4
by: kinne | last post by:
The following code is supposed to reverse the date in "yyyy-mm-dd" format, but it produces different results in Firefox 1.0 and in Internet Explorer 6SP1. In Firefox, the result is correct...
9
by: /* frank */ | last post by:
I want system ("CLS") if the system is WINDOWS system ("CLEAR") is the OS is a UNIX like.
8
by: TTroy | last post by:
I have a few questions about "scope" and "visibility," which seem like two different things. To me "visibility" of the name of a function or object is the actual code that can use it in an...
3
by: Jukka K. Korpela | last post by:
Some time ago in this group, someone suggested that we should develop a "different" user style sheet to demonstrate what a user style sheet or a browser style sheet _could_ do. I guess the idea was...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.