Filter combo box values based on checkbox value?

cathalfarrell

Registered User.
Local time
Today, 13:35
Joined
Mar 10, 2008
Messages
41
I know it is possible to have casscading combo boxes, is it also possible to casscade their field values based on the selection of a particular checkbox?

How do I do this, I am very new to access and databases so your patience in explaining to me is greatly appreciated.

Thanks
Cathal
 
It would just be a variation on the Cascading Combo box theme.

You would edit the Combo's Row Source and insert the criteria;
Code:
[Forms]![YourFormName]![YourCheckBoxName]
under the check box field.

You would also need to force the Combo to Requery in the Form's On Current Event and in the On Click event of the Check Box.
 
Thanks John

I hate to be a pain, I'm very unfamilar with building the code, how would this work if I had three checkboxes and wanted the values of the combo box to change depending on which check box I selected?

Cheers,
Cathal
 
Thanks for your help John

I have three variables that I want to filter in the combo boxes. User will select:
Country they wish to visit
Region they will be staying
Hospital they want to visit

There are a number of regions and hospitals but only three Countries. I could use a combo box for each variable but I thought that as there were only 3 countries it would be easier to use a choice of three check boxes instead of having to selected a drop down. Then the regions would filter based on the checkbox selection, the Hospitals will filter based on the Region combobox selection.

Not sure if I've explained that very well.

Thanks
Cathal
 
I think it's going to be far easier to use Combo Boxes rather than check boxes, this will also make things more flexible should you wish to add more countries regions and hospitals at a future date.
 
Ah, I hadn't thought that far ahead.

Makes perfect sense and will save me a lot of time redesigning forms in the future.

Thanks John
 

Users who are viewing this thread

Back
Top Bottom