Yet another of my odd questions, feel free to skip if you don't care...
I am attempting to design a query form to let people find things in a
mixed set of records. For simplicity's sake let's say there are
R1-type records and R2-type records. In the R1-type records there's a
data value that's either Yes or No. In the R2-type records this data
value is undefined or unset. Question: how do I form this query?
If I give people a pair of checkboxes labeled "yes" and "no" then if
they check yes they get only records with yes in that value; likewise
if they check only no, they get records with no in that value.
Checking both gives you records with either value.
This works great for finding R1-type records, but how do I let people
query for the R2-type records?
I can send down a hidden "null" value so that when neither checkbox is
checked I get the R2 records, but then how do people search for "all
R1-type records with EITHER yes or no"?
OK, I can make the null value visible, but that forces people to know
about the structure of my database when they don't care about that.
What they really want to say (I think) is that "I don't want this
field to be part of the search criteria." In the fields that are text
boxes we do that by leaving the box empty but leaving a checkbox empty
means something different.
I've thought about using tri-state boxes but that's awkward as hell
and potentially leads to a lot of checking as there are many such data
fields in this search form.
I can't possibly be the first one to solve this problem - anyone know
a good solution?