General discussion

Locked

VB datacombo not displaying field list

By clesafe ·
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.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by mark.see In reply to VB datacombo not displayi ...

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.

Collapse -

by asbellm In reply to VB datacombo not displayi ...

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

Collapse -

populate combo box from table

by carterlangley In reply to VB datacombo not displayi ...

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

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums