True or False Query Issue

jesusoneez

IT Dogsbody
Local time
Today, 05:52
Joined
Jan 22, 2001
Messages
109
I have a query that shows banned users (I work in a school). When a student's ban has ended, a tick box is checked in a form linked to tblBannedUsers to show they are no longer banned.

The query itself simply queries all records in tblBannedUsers with a username field (UserID) taking search criteria from a box on a form.

However, I want to filter out the students that are no longer banned (those with a tick in the checkbox). To do this, I thought it would be a simple case of editing the query, and in the Ban Lifted field criteria, use =False to say I only want those records with a tick.

This doesn't work and I still get all records given the combo box filter (which are just filtering for a username...if I leave it blank it gives all records via Is Null).

What should I be putting in the criteria to filter out those records with a ticked checkbox?

Thanks,

Steve Swallow

EDIT: I've just done a test query and <B>No</B> is the criteria to use, but when I use this criteria in my query which also take data from a form's combo box it ignore the <B>No</No> criteria.
 
Last edited:
Nope...didn't work. Still getting all records, true and false. I'm gonna strip it down so I can post it here for people to have a look at because it should work...yet it isn't.

EDIT: I've attached a stripped down version with just the necessary tables/forms/query blah. At the moment, the query is trying to filter out by using <>True. I think most of what I've tried should work, but nothing does. If someone could take a gander I'd be greatful. To run the query, use frmBannedUsersViewEdit. It runs the query in the subform, showing all records initially (although this should be only unchecked banned users). The combo box can be used to pick individual users, or press Clear and Search to bring up the complete list again.
 

Attachments

Last edited:
I have attached your database
The problem was wirh your query
You have to supply <> True on each criteria line
 

Attachments

Users who are viewing this thread

Back
Top Bottom