How do I filter out yes?

G

Guest

I have created a database that has multiple yes/no command boxes. I need to
apply a filter or query that will filter out all the yes fields and only
leave me with the no's. In other words, if a row contains multiple boxes that
have yes and no commands, how do I get it to filter out the fields that
contain yes' and leave me with what information I am missing (hence the no's)?
 
G

Guest

Hi Karen,

Create the query to filter your records (assuming for a report). In the
criteria for each field you will need to put "No". Then only checkboxes with
the "No" value will be displayed.
 
F

fredg

I have created a database that has multiple yes/no command boxes. I need to
apply a filter or query that will filter out all the yes fields and only
leave me with the no's. In other words, if a row contains multiple boxes that
have yes and no commands, how do I get it to filter out the fields that
contain yes' and leave me with what information I am missing (hence the no's)?

As criteria for each field in the query, write:
No
Place the No for each check box column on the row beneath the previous
No which will create an Or Where clause.

Where Tablename.Check1 = No Or Tablename.Check2 = No Or etc.....

Note that the No is NOT surrounded with quotes.
 
G

Guest

Thanks for your help. The query you suggested does work, but there is a
problem. When I ran the query with the no in the criteria, I only got one
field. I was hoping that it would display all the fields with no's, not just
the only field who had no's is all the command boxes. Can this query be
selective? If one person has a no in a labor license field a yes in an
insurance field and a no in a drivers license field, and another person has a
yes in labor license, yes in insurance but a no in drivers license; how can I
get the database to show me each row with the corresponding no's? For
example, can it show me that person one has no labor license and no drivers
license, but person two has no insurance?
 
J

Joseph Meehan

Karen said:
Thanks for your help. The query you suggested does work, but there is
a problem. When I ran the query with the no in the criteria, I only
got one field. I was hoping that it would display all the fields with
no's, not just the only field who had no's is all the command boxes.
Can this query be selective? If one person has a no in a labor
license field a yes in an insurance field and a no in a drivers
license field, and another person has a yes in labor license, yes in
insurance but a no in drivers license; how can I get the database to
show me each row with the corresponding no's? For example, can it
show me that person one has no labor license and no drivers license,
but person two has no insurance?

I am not sure what you want.

Do you want all the records that have a no in any of a group of fields?
Do you want only those that have no in all the the fields in that group
(group of yes-no fields)? Is your problem the query is only showing the one
filed that you are searching on and you want to see all the fields?
 
G

Guest

Good point about the No with no quotes. That's one reason that I use 0 for no
and -1 for yes instead.

Also good catch on the Or statements.
 
G

Guest

Hello Joseph,

I wanted to see all the fields to all records with no's, not just the one
record with no's is all the boxes. Another person responded and their idea
worked. I have not used access in this way before, that is why I got a little
stumped and had to ask for help. The point that helped asked me to write
Tablename.check1=no. I did this, but then it asked me for a parameter value.
I have never encountered this question before so I just entered a number 1
for no. That seems to have worked, I hope I did it right.
 
G

Guest

Hello Fred,

Thanks for the help, it is very appreciated. I got a message I have never
received before when performing your recommendation "Parameter Value". I have
heard of this message, but never received one on databases I have worked
with. I entered a number 1 for no and it seems to work. Please let me know if
I screwed that up too.
 
F

fredg

Hello Fred,

Thanks for the help, it is very appreciated. I got a message I have never
received before when performing your recommendation "Parameter Value". I have
heard of this message, but never received one on databases I have worked
with. I entered a number 1 for no and it seems to work. Please let me know if
I screwed that up too.

No = 0. Yes = -1.
So you could use 0 instead of No as criteria (or -1 instead of Yes for
Yes criteria).
It may be that you have miss-entered a field name and Access is
looking to get the value. What value does the parameter ask for? That
will give you a clue as to where to look.
 
G

Guest

Hello Fred,

That's the freaky part, it doesn't ask for anything specific it just wants
the parameter value for "License.Check1", "Insurance.Check1, "Drivers
License.Check1" and "Assistant.Check1". I get all these default message boxes
one after the other. I don't know what they mean but I figured, using
probability logic, it couldn't be worth more than 1. I tried entering the 0
like you suggested, but that gives me all the entries in the database
including the yes'. I am unsure about what information it is truely looking
for, but the number 1 seems to work okay for my purposes. I hope I don't get
tested on this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top