Yes/No Data type field and queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a yes/no field in my query I qould like toenter a criteria that would
only display fileds that are "No" or unchecked. Do you know what I would need
to enter to do this? My filed is Active/Inactive, I only want to display
active entries.

Thank you
 
Either False or 0 will return only rows that are unchecked. To return rows
that *are* checked, the safest method is to use <> 0. When using Access and
the Jet database engine, you could use -1, but in other situations, such as
when working with a SQL Server data source, True may be represented by 1
rather than -1, and <> 0 will work for both.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
I am having a similar problem

In the criteria field of the query buiilder, I am entering the Statement

(SELECT resolved From tblflag WHERE resolved=False;)

However I keep getting a message that at most one record can be returned.. I
KNOW this is incorrect. any ideas!?
 
From the description, I guess you use the posted String (SubQuery) as the
right side of a Boolean expression where the left side is a Field name. In
this case, JET expects your SubQuery to return a single value, (i.e. a 1 row
x 1 column return). However, you SubQuery returns more than 1 row (1 row
for each Record that has resolved = False) and hence you get the error.

If you need further help, post relevant Table details, what you want the
Query to select and the *whole* SQL String of your attempted Query.
 

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

adding yes/no field 2
query yes/no field 6
Unable to set query parameter 17
Yes/No Field 2
Yes/No Data Type 2
How do I set criteria to show only Yes cases using a Y/N field? 2
Access 2010 0
Yes/No from TextBox in query 2

Back
Top