If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
VB to filter a list
Hi
I have a worksheet containing a list of businesses, their addresses, phone numbers, and so on, and also a column which specifies the type of organisation: sports shop, cafeteria, phone shop, etc. On a form I have a pair of comboboxes. I want ComboBox1 to act in the same way as the data filter facility on the sheet. So in its default state, ComboBox2 gives a list of every company. However, if the 'Phone Shop' option was selected on CB1, then the available list in ComboBox2 would just be of those stores. Please can anyone advise on how to do this? Thanks in advance Steve |
#2
|
|||
|
|||
VB to filter a list
Steve,
The Autofilter already works in the way you describe. If you've selected a value from a field, other field's dropdowns show only available values. Maybe it will work for your application. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "CrankyLemming" wrote in message m... Hi I have a worksheet containing a list of businesses, their addresses, phone numbers, and so on, and also a column which specifies the type of organisation: sports shop, cafeteria, phone shop, etc. On a form I have a pair of comboboxes. I want ComboBox1 to act in the same way as the data filter facility on the sheet. So in its default state, ComboBox2 gives a list of every company. However, if the 'Phone Shop' option was selected on CB1, then the available list in ComboBox2 would just be of those stores. Please can anyone advise on how to do this? Thanks in advance Steve |
#3
|
|||
|
|||
VB to filter a list
"Earl Kiosterud" wrote:
Steve, The Autofilter already works in the way you describe. If you've selected a value from a field, other field's dropdowns show only available values. Maybe it will work for your application. Hi Thanks for replying. It doesn't work. I've tried to have ComboBox1 'fill' the a cell which has an autofilter set already, but the available list then given in ComboBox2 is still all the businesses. Steve |
#4
|
|||
|
|||
VB to filter a list
Debra Dalgleish has some techniques for doing this with data|validation.
You could adapt it to work with comboboxes. CrankyLemming wrote: "Earl Kiosterud" wrote: Steve, The Autofilter already works in the way you describe. If you've selected a value from a field, other field's dropdowns show only available values. Maybe it will work for your application. Hi Thanks for replying. It doesn't work. I've tried to have ComboBox1 'fill' the a cell which has an autofilter set already, but the available list then given in ComboBox2 is still all the businesses. Steve -- Dave Peterson |
#5
|
|||
|
|||
VB to filter a list
Dave Peterson wrote:
Debra Dalgleish has some techniques for doing this with data|validation. You could adapt it to work with comboboxes. Thanks for the nod. I'll have a look & see what comes of it. S |
Thread Tools | |
Display Modes | |
|
|