var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Cascading Combo box
Hi folks, First time poster.
Im not overly / very / good / terrible at databases but I have been trying to create a database on business contacts.
I have a main table with all the information on the business and then 3 other tables that refer to business categories.
tbl_business (main one)
I have produced a form based on tbl_business that has two combo boxes,
The first one (populated by a table lookup to tbl_sic_codes) is to select the general category of the business and it is called
The next one is called cbo_Trade but I want to use a cascading combo box function to call the appropriate table.
For example if cbo_Sic_Codes is set to "Hotels Category"
cbo_Trade will look for the table called "tbl_hotels_category" which will allow me to use the combo boc to display B&B's, hotel, self catering etc (all stored in tbl_hotels_category table.
I think I need a CASE select statement and have spent hours Googling it and trying different methods but its not working at all for me. I need to set the rowsource on cbo_Trade to the table.
Select Case Me.cbo_Sic_Codes
Case "Hotels Category"
I found a few examples on the net but nothing has worked so far.
Can some kind person please help me?
First thing I would look at doing is to combine these tables
into a single table. Is this possible?
yeah thats possible. I actually started with two tables.
one with the general category in it and the other with a long long list of more detailed business services.
What I don't understand is how to only select a few related categories outta the business.
Thanks for replying.
They key will be in creating a relatio0nship between the two tables.
For the cascading to work, The first combo box will be used as a filter to select row for the second combo box.
In the new table that combines these
You will need to add a field that can be used to relate the records to the SIC table.
The issue comes when a category applies to multilpe SIC codes.
This will require you to use a junction table to relate the SIC code to Categories with a many-to-many relationship.
My suspicion is that this is the case.
Note: You might consider switching to the newer NAICS (click here for info) which might give you the detail you are looking for. If it does, this would allow you to use a single table.