S
Sandy
I have a form with two combo boxes. The second one is dependent on the value
in the first. It all works fine other than if the user moves to an existing
record, the value on the underlying query does not show in the comboBox2.
The code used for providing the data in comboBox2 is :-
Private Sub comboBox1_AfterUpdate()
On Error Resume Next
Me.comboBox2.RowSource = "SELECT tblRepairType.RepairTypeID,
tblRepairType.RepairType FROM" & _
" tblRepairType WHERE RepairCategoryID = " & Me.cboRepairCategoryID
& _
" ORDER BY RepairType"
Me.comboBox2 = Me.comboBox2.ItemData(0)
Me.comboBox2.Requery
End Sub
Any ideas?
Sandy
in the first. It all works fine other than if the user moves to an existing
record, the value on the underlying query does not show in the comboBox2.
The code used for providing the data in comboBox2 is :-
Private Sub comboBox1_AfterUpdate()
On Error Resume Next
Me.comboBox2.RowSource = "SELECT tblRepairType.RepairTypeID,
tblRepairType.RepairType FROM" & _
" tblRepairType WHERE RepairCategoryID = " & Me.cboRepairCategoryID
& _
" ORDER BY RepairType"
Me.comboBox2 = Me.comboBox2.ItemData(0)
Me.comboBox2.Requery
End Sub
Any ideas?
Sandy