Hi All, I've an Access 2000 form which consists of several combo boxes. Combo A will influence the data shown under Combo B. Combo C will influence Combo D, and so on.
Strange things happen when I use "AddItem" in my VBA code for ComboA_change event. Combo B's rowsource type has been set to value list. The rowsource under ComboB shows the data retrieved however the data is not shown inside the Combo B itself, it's just empty, what's the problem here?
Then I change the code by using rowsource directly link to SQL statement, like this:
Private Sub ComboA_Change()
Dim x As integer
x = ComboA.Value
With Me.ComboB 'ComboB rowsource type is changed to table/query
.RowSource = "SELECT * from table A where Id = " & nilai
End With
End Sub
It works fine and correct data is shown under ComboB when
ComboA is changed.
BUT when I apply the same thing to ComboC and ComboD, it doesnt work, why??????? it works for ComboA and ComboB. Please help.
Strange things happen when I use "AddItem" in my VBA code for ComboA_change event. Combo B's rowsource type has been set to value list. The rowsource under ComboB shows the data retrieved however the data is not shown inside the Combo B itself, it's just empty, what's the problem here?
Then I change the code by using rowsource directly link to SQL statement, like this:
Private Sub ComboA_Change()
Dim x As integer
x = ComboA.Value
With Me.ComboB 'ComboB rowsource type is changed to table/query
.RowSource = "SELECT * from table A where Id = " & nilai
End With
End Sub
It works fine and correct data is shown under ComboB when
ComboA is changed.
BUT when I apply the same thing to ComboC and ComboD, it doesnt work, why??????? it works for ComboA and ComboB. Please help.