E
Ed H
I have two combo boxes. The first which is bound, displays vehicle make.
The second which is not bound is to display the models for the make of
vehicle chosen from combo1.
I used the example on the MSDN site for the second combo. When you click on
the arrow for combo2 (cbo_VehicleModel), it appears that everything works as
combo2 appears to have the correct number of records. The problem is, there
is nothing actually displayed other than a blank list with the depth of the
correct number of entries to be displayed.
If there is an easier or more appropriate why, please feel free to suggest
Private Sub FLD_VehicleMake_Exit(Cancel As Integer)
Dim STR_SQL As String
Dim cboType As ComboBox
STR_SQL = "SELECT TAB_VehicleMakeModel.FLD_VehicleModel FROM
TAB_VehicleMakers " & _
"INNER JOIN TAB_VehicleMakeModel ON
TAB_VehicleMakers.FLD_VehicleMake = " & _
"TAB_VehicleMakeModel.FLD_VehicleMake " & _
"WHERE (((TAB_VehicleMakers.FLD_VehicleMake)= '" &
Me.FLD_VehicleMake & "'));"
Set cboType = Me!cbo_VehicleModel
With cboType
.RowSourceType = "Table/Query"
.RowSource = STR_SQL
.ColumnCount = 1
End With
End Sub
The second which is not bound is to display the models for the make of
vehicle chosen from combo1.
I used the example on the MSDN site for the second combo. When you click on
the arrow for combo2 (cbo_VehicleModel), it appears that everything works as
combo2 appears to have the correct number of records. The problem is, there
is nothing actually displayed other than a blank list with the depth of the
correct number of entries to be displayed.
If there is an easier or more appropriate why, please feel free to suggest
Private Sub FLD_VehicleMake_Exit(Cancel As Integer)
Dim STR_SQL As String
Dim cboType As ComboBox
STR_SQL = "SELECT TAB_VehicleMakeModel.FLD_VehicleModel FROM
TAB_VehicleMakers " & _
"INNER JOIN TAB_VehicleMakeModel ON
TAB_VehicleMakers.FLD_VehicleMake = " & _
"TAB_VehicleMakeModel.FLD_VehicleMake " & _
"WHERE (((TAB_VehicleMakers.FLD_VehicleMake)= '" &
Me.FLD_VehicleMake & "'));"
Set cboType = Me!cbo_VehicleModel
With cboType
.RowSourceType = "Table/Query"
.RowSource = STR_SQL
.ColumnCount = 1
End With
End Sub