Identify only true values from multiple check boxes on form

sakhtar

New member
Local time
Yesterday, 22:18
Joined
May 6, 2013
Messages
6
I have a form with multiple check boxes (each of which open a new subform).
I need a query which will only identify which check boxes are ticked for each record but cannot seem to work out how i can structure the query. Can anyone suggest how I can do this please?
 
I don't think we have enough information. Your table is not properly normalized and that could be making this harder than it needs to be. I just can't make sense of:

I need a query which will only identify which check boxes are ticked for each record

You can always tell which fields are true by examining the recordset created by a query.
Are you saying that you only want to select a record if one or more fields are true? Are you saying that you only want records where 1 and 5 are true?
 
Sorry if am not clear.

My record has multiple check boxes. What I wanted was for each record to know which text boxes are checked. This should allow me to do another query on the subforms linked to the checked filed only.

I hope that is clearer and apologise in advance if not.
 
But each record DOES know which of its boxes was checked. That's why you save records in a table. The question isn't whether it knows but what you wanted to do about it.

I need a query which will only identify which check boxes are ticked for each record

Queries don't do this (in exactly the way you said it). What kind of list are you trying to generate?

A list of records with at least one box checked? That would be a query with a big WHERE statement like ... "WHERE CB1 = True OR CB2 = True OR CB3 = True ..." The result would be a list of records with at least one box checked.

A list of checked boxes from each record? In that case you structured the record poorly to support that particular question. You need a complex UNION query OR you need to make a parent/child table setup where the child records are the parent record number, the checkbox number, and a box value of either TRUE or FALSE. Then select all child records with a value of TRUE. The result would be a list of checked boxes from each record, made easy if you structured the tables to support your goal.
 

Users who are viewing this thread

Back
Top Bottom