Question Load Table Data according to Drop-Down List iem select

tarek_ta2ta2

Tarek
Local time
Today, 01:01
Joined
Jun 8, 2008
Messages
47
i will try to explain every thing in a clear way
i have Many tables
table1 : contains cars makes like ( BMW - Toyota -Honda)
and this is the basic table

and i ahve other tables contains the models for each make
ex: BMW Models Table - Honda Models Table

and i create two drop down list

the first one to select the car make ( BMW- Toyota - Honda)

i want when i select an item in the first drop-down list

the other drop down list items will be loaded the table contains the models for this make
ex: when i select toyota in the first drop-down list the other drop-woen list will load the toyota models from its table

and if i select honda it will load the honda models

i hope i explian what i want

please ... if anyone know how to do this please help me.
thanks
 
Thans .. it works

thanks alot for your support

it works very well with me and even open to my other ways to do it

thanks
 
and i ahve other tables contains the models for each make
ex: BMW Models Table - Honda Models Table
You should not have many tables, you should have one table with a field that holds the make.
 
More Explain

that's exactly what i did

table called -- tblMake ( Contain all the makes like Toytoa-Honda-Bmw)

and for every car make i made atable for the models

ex
tblBmw ( contains models like 5 series - 3 series - z4)
tblToyota ( contains models like corolla- camry- avalon)

then i create aform contain two combo-Boxes

one for the make (cboMake) and one for the model (cboModel)

in the make combo-box
i wrote this code

Option Compare Database
Private Sub cboMake_AfterUpdate()
On Error Resume Next
Select Case cboMake.Value
Case "Toyota"
cboModel.RowSource = "tblToyota"
Me.cboModel = vbNullString
Case "BMW"
cboModel.RowSource = "tblBMW"
Me.cboModel = vbNullString
End Select

End Sub


so for any ideas i iwill appreciate that.
 
I scanned the original post and didn't even pick up on the multiple tables. I would also just have one, with a Make field and a Model field, much like the sample has one table with states and cities.
 
that's exactly what i did

table called -- tblMake ( Contain all the makes like Toytoa-Honda-Bmw)

and for every car make i made atable for the models
No, one table for makes and one table for models. That way you don't need to worry about using the correct table, you just apply a filter or a parameter query.
 

Users who are viewing this thread

Back
Top Bottom