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.
But the problem is that using the data/table/query/comboBoxes I provided
below, When I run it I am getting a small window Title "Enter Parameter
Value -Forms!FormName!cbxCombo1", I will like to get rid of this, and just
let the second comboBox be populated with entering a value into the window.
2nd Question - If I change the choice of the 1st ComboBox, how can I get the
2nd ComboBox to reflect this.?
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!FormName!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.
But the problem is that using the data/table/query/comboBoxes I provided
below, When I run it I am getting a small window Title "Enter Parameter
Value -Forms!FormName!cbxCombo1", I will like to get rid of this, and just
let the second comboBox be populated with entering a value into the window.
2nd Question - If I change the choice of the 1st ComboBox, how can I get the
2nd ComboBox to reflect this.?
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!FormName!cbxCombo1;
Thanks
Tiger