Discussion Locked

VB datacombo not displaying field list

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Am trying to come up with a combo box in vb 6 that picks a list from access database. I have managed to connect to the database. the problem is i cant move further to achieve my goal. When i use combobox, it displays a record at a time and only if i use ADO control buttons of Forward or Backward.

NB. It is now am trying to learn VB. And i must come up with an application within two weeks.

3 replies

by mark.see

Use a datacombo box instead of a regular combo box. You will have to set the RowSource, ListField, DataSource, DataField and BoundColumn properties appropriately but this is the easiest way to hook into an access database.

by asbellm

A slightly different approach that I use is to load the table values into an array at the beginning of the application, and then build the combo box list from this. This might not be suitable if your Access data changed regularly

by carterlangley

with cboComboBox
do until rstRecordSet.eof
.additem rstRecordSet.Fields("FieldName").Value
rstRecordSet.movenext
loop
end with

This discussion is closed to new replies.