Originally Posted by
rpeare
a yes value on a checkbox is actually stored as a -1, not a 1 or a "YES"
You have a few options
1. You can build a SQL statement on the fly and change the record source of your report when you click your button
2. You can create a separate query for each possibility and either create a report for each possible query or change the record source
3. Create an 'indicator' field in your query that changes based on your choices.
The easiest thing to do is #3 if you're not great with code.
For example if you create a field in your query like this:
Show: IIf(IsNull([OrderBalance]) or [orderbalance] = 0,(IIf([forms]![dfrmOrderStatus]![orders]=-1,1,0)),1)
Then add a criteria of 1 to the SHOW field.
In my example I created a table with a bunch of 0 and or null fields on a numeric field as well as some record that had data. With this formula I could exclude or include anyone who had a zero or null balance by using a 1 in the criteria.