Linking Combo Boxes - Help
Hi all,
Ive attached a test db to this post so u can all see wot im trying to do here. Ive basiclly got 3 tables with fields:
tblCar: Make, Model, Mileage
tblMake: MakeID, Make
tblModel: MakeID, Model
If u look at the relationships ull see how ive set them up. This should work.
On the form frmCar ive got 2 combo boxes and a textbox. This form adds a record to tblCar. The first combo lets you select a car make. The second combo lets you select a car model and the textbox is so you can enter the car milage. This is just an example database remember just focusing on what im trying to do. I want it so when you select a car make from the first combo this filters whats in the 2nd combo, so u can only select a specific model of car for the make selected in the first combo. This is not like the other cascading combo situations ive seen, because ive structered the tables especially for this. If u look at the table relationships and structure you'll see each make has a unique ID which is linked to the model table. And in the model table a model that is specific to a make in the make table has the specific MakeID next to it. For example Ford has a MakeID of 1 in the make table. So in the model table all models that are made by ford have a 1 in next to them in the MakeID table, which is linked to the MakeID in the make table. So the MakeID is related to the Model. U will see what i mean when you look at the structures and relationships of the tables. I know what ive done will work, but i dont know howto get the combos to cascade to this so i can select a make and then a specific model for that make. Is there a few queries i need to use or something else? Theres got to be a query that can be put together in the after event or row source of the combos hasnt there?
Im really stuck with this 1 guys
Any help would be greatly appriciated, in pointing me in the right direction.
Thanks
Jim
Hi all,
Ive attached a test db to this post so u can all see wot im trying to do here. Ive basiclly got 3 tables with fields:
tblCar: Make, Model, Mileage
tblMake: MakeID, Make
tblModel: MakeID, Model
If u look at the relationships ull see how ive set them up. This should work.
On the form frmCar ive got 2 combo boxes and a textbox. This form adds a record to tblCar. The first combo lets you select a car make. The second combo lets you select a car model and the textbox is so you can enter the car milage. This is just an example database remember just focusing on what im trying to do. I want it so when you select a car make from the first combo this filters whats in the 2nd combo, so u can only select a specific model of car for the make selected in the first combo. This is not like the other cascading combo situations ive seen, because ive structered the tables especially for this. If u look at the table relationships and structure you'll see each make has a unique ID which is linked to the model table. And in the model table a model that is specific to a make in the make table has the specific MakeID next to it. For example Ford has a MakeID of 1 in the make table. So in the model table all models that are made by ford have a 1 in next to them in the MakeID table, which is linked to the MakeID in the make table. So the MakeID is related to the Model. U will see what i mean when you look at the structures and relationships of the tables. I know what ive done will work, but i dont know howto get the combos to cascade to this so i can select a make and then a specific model for that make. Is there a few queries i need to use or something else? Theres got to be a query that can be put together in the after event or row source of the combos hasnt there?
Im really stuck with this 1 guys
Any help would be greatly appriciated, in pointing me in the right direction.
Thanks
Jim
Attachments
Last edited: