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

Help with a report

P: n/a
I have a report in access and most of the fields are set up as YES/NO
fields.
I need to display those fields if and only if the value of the field is
YES.
Otherwise, the field should be hidden. This is easy to do on a form
with the visible property but can't seem to figure out a way to make
this work on a report.
Thanks for any input on this.

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"cypisek" <cy*****@netzero.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a report in access and most of the fields are set up as YES/NO
fields.
I need to display those fields if and only if the value of the field is
YES.
Otherwise, the field should be hidden. This is easy to do on a form
with the visible property but can't seem to figure out a way to make
this work on a report.
Thanks for any input on this.


Do an in-line IF in the report's query for the field(s) in question:

IIf([MyField]=SomeValue,[MyField],Null)

Regards,
Keith.
www.keithwilby.com

Nov 13 '05 #2

P: n/a
I do this:
Newfield: IIf([onehour]="-1","[onehour]","Null")
Still get an #error after running the query. The field is YES (check
box). I tried YES instead of the -1 and still nothing. Any thoughts?

Nov 13 '05 #3

P: n/a
I got it: this works (no "" marks around the first YES value, if you
use a check box)

Nov 13 '05 #4

P: n/a
You shouldn't need to use quotes anywhere except when quoting literal text.

"cypisek" <cy*****@netzero.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I got it: this works (no "" marks around the first YES value, if you
use a check box)

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.