Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty Combo Box

Status
Not open for further replies.

sandra45

Technical User
Apr 3, 2003
72
0
0
ID
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.
 
Hi all, I've found the problem, it's just the column width that I need to set to show the data, sorry for the inconvenience caused.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top