Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for check box

Status
Not open for further replies.
Jun 10, 2004
58
US
I've got a report that I'd like to use a checkbox field for the criteria. Basically, I want all the records that do NOT have a check in the box to display on my report. The only values for the checkbox are Y (checked) and N (not checked). When I use the formula ({field.name})="Y" I get the correct records. When I use the same formula and substitute N for Y, I get NO records! I've tried using null, not isnull, and " " for an empty field, but I still get nothing. Can someone please help me with this?
 
Please post the formula for "N" that is not working.

Have you tried
{field.name} <>"Y"


Mike
 
The formula that DOES work is: {field.name} = "Y"
The formula that DOESN'T work is {field.name} = "N"

I've tried "not equal to" Y, "is greater than" Y, and "<>" to Y.

Thanks for any advice you can give me!
 
You said your tried isnull({your.field}) and an epty field {your.field}=""

What are your results if you don't use this field as a limiter?

Are you using linked data sources? If so, what kind of link are you using?

Mike
 
What happens when I use my formula with N in it is that I get NO RECORDS in my report.

I don't understand why Y works and N doesn't since those are the only two values for this field.
 
I know you don't get any records when you use {Field}="N"

That wasn't what I asked. I asked what happens if you don't use the field as a limiter. Does the field "N", or do you get only Y's or do you get blanks fields?

No {field} ="Y", no {field} ="N", no isnull({field}) nothing pertaining to your field in the select expert.

Mike
 
When I use no limiters in my report I get all the records that meet the other criteria I've specified. When I use Y i get only the records with the checkbox checked; when I use N i get no records at all.

Sorry if this isn't clear or I don't completely understand your question. I appreciate your help!
 
Do you have the field that would display the Y or N on your report canvas.

What is in that field?


Mike
 
No, the field is not on the report canvas. I tried that, but I got the VALUE for the field on the report, which is not what I want.
 
The only value I saw was TRUE. I didn't look at the value for this field on all of the records. It makes me think that N is not the other value for this field . . . that it's something else. But I don't know what it could be other than N or null blank), and I've tried both of those. I've also tried "False.
 
Hi,
To see what's there create a report that only has the field in question and group on it..

Hide the details and you will get the distinct values in that field..

[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top