T
tiger
Hi,
I have two combo box on a form and I was trying to use the top combo box to
determine the content of the 2nd combo box. i.e if the top combo box content
is Car and Truck. If the user select Car, then the content of the second
combo box will be list of Cars type in table and if the user selects Truck
the content of the second combo box will be Truck in table.
My question is if I change the choice of the 1st ComboBox for the second
time or several times, how can I get the 2nd ComboBox to reflect this
changes?
I have a table like this below...
tblAuto:
Automobile Type
C240 Car
LS430 Car
F150 Truck
Ram Truck
Tundra Truck
GeoPrizm Car
Audi A6 Car
and I have two ComboBox on a Form name: - cbxCombo1, cbxCombo2
In cbxCombo1 I have the following...
Code:-
Private Sub cbxCombo1_Afterupdate
Me!cbxCombo2.Requery
End Sub
Property:-
RowSourceType = Table/Query
RowSource = Category
Category is a Query see below...
SELECT DISTINCT tblAuto.Type FROM tblAuto;
For cbxCombo2 I have the following...
Property:-
RowSourceType - Table/Query
RowSource - Query1
Query1 is....
SELECT tblAuto.Automobile FROM tblAuto WHERE tblAuto.Type =
Forms!Form3!cbxCombo1;
Thanks
Tiger
I have two combo box on a form and I was trying to use the top combo box to
determine the content of the 2nd combo box. i.e if the top combo box content
is Car and Truck. If the user select Car, then the content of the second
combo box will be list of Cars type in table and if the user selects Truck
the content of the second combo box will be Truck in table.
My question is if I change the choice of the 1st ComboBox for the second
time or several times, how can I get the 2nd ComboBox to reflect this
changes?
I have a table like this below...
tblAuto:
Automobile Type
C240 Car
LS430 Car
F150 Truck
Ram Truck
Tundra Truck
GeoPrizm Car
Audi A6 Car
and I have two ComboBox on a Form name: - cbxCombo1, cbxCombo2
In cbxCombo1 I have the following...
Code:-
Private Sub cbxCombo1_Afterupdate
Me!cbxCombo2.Requery
End Sub
Property:-
RowSourceType = Table/Query
RowSource = Category
Category is a Query see below...
SELECT DISTINCT tblAuto.Type FROM tblAuto;
For cbxCombo2 I have the following...
Property:-
RowSourceType - Table/Query
RowSource - Query1
Query1 is....
SELECT tblAuto.Automobile FROM tblAuto WHERE tblAuto.Type =
Forms!Form3!cbxCombo1;
Thanks
Tiger