How to Filter in Query a Triple State Check Box

D

doyle60

I like to put filters on queries that will return all records if the
form control is null. For a text filter, I use something like this:

Like (IIf(IsNull([Forms]![DDShipmentPrintfrm]!
[CountryChosen]),"*","|[Forms]![DDShipmentPrintfrm]!
[CountryChosen]|"))

But what would be the criteria row code for a triple state check box on
a form (where the third and gray state returns all)?

Thanks,

Matt
 
A

Alex Dybenko

try (assuming your field called Shipped and checkbok - chkShipped):

(Shipped = Forms!MyForm!chkShipped or Forms!MyForm!chkShipped is null)
 
D

doyle60

Thanks. But it didn't work. But I turned it around to:

(Shipped = Forms!MyForm!chkShipped is null or
Forms!MyForm!chkShipped)

and that did the trick. Thanks,

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top