Filtering A form with multiple checkboxes

ppete

Registered User.
Local time
Today, 20:13
Joined
Jan 15, 2002
Messages
27
Can anyone help?

I want to filter a form with a number of check boxes.

I've got two checkboxes for a field called Market, (UK & Europe), four more for ShopType and another for ShopStatus. I've started out using the following code behind the after update property of the checkbox...

If chkBoxA.Value = True then
Docmd.Applyfilter "[Market] = '"UKR"'

...but I have a feeling this is taking a very long way to do something simple. Any help would be greatly appreciated.

Ppete
 
Have you tried using the QBE option which can handle almost endless criteria? It takes off where filter runs out of flexibility.
 
Thanks for the reply Rich,

but as far as I can see this only solves the problem if I can send values into the query depending on which checkboxes are checked. I'm afraid I'm still a bit lost.

Ppete
 
I thought this was going to be a simple fix but after consulting with this forum, books, on line help and workmates I am still none the wiser.

The only way I can think of to get around this prob is to constuct a dynamic sql statement with loads of If ... then... else or Select case statement.

Has anyone else got any suggestions? I want to reduce the recordset to show only the records that correspond to the ticked checkboxes but the checkboxes refer to 3 different fields.

Thanks in advance for help / advice,

Ppete
 

Users who are viewing this thread

Back
Top Bottom