Parameter Query returning Incorrect Results based on checkbox

mbamber

Registered User.
Local time
Today, 19:19
Joined
Jul 30, 2013
Messages
31
Hi all,

I have a parameter query that contains information on a list of people and contains 3 checkboxes: alumni, parent, business

In this query, I am trying to use parameters to filter the results based on these three fields i.e.

true, false, true would return all records where either alumni, business or both are true, and parent can be either true or false.

false, true, false would return all records where only parent is true, and the other fields do not matter.

Its quite straight forward really, i'm just a bit of a novice!

Basically, my question is, how do I get this to work. I have tried and failed miserably.

TIA
 
Since you do not want to directly filter by the result of the checkbox, you will need to set up some type of logic to discern what to use for the criteria in your query. You could add 6 invisible controls to your form to hold the criteria values, which are 0 for false and -1 for true, and decide what each value should be based on your logic. If you only want true, set both values to -1, if you only want false, set both values to 0, if you want both, set Val1 to 0 and Val2 to -1. Then you can set the criteria for each column to the appropriate control in the form:

[Forms]![yrForm]![AlumniVal1] Or [Forms]1[yrForm]![AlumniVal2]

If this is a bit much, please attach your DB and I will show you how to do so.
 
OK. I'll try that. I think I have another way around it, because I've come up with further complications now. Thanks anyway though!
 

Users who are viewing this thread

Back
Top Bottom