Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleUse a DBCombo control
KeywordsDBCombo, database, data
CategoriesControls
 
The DBCombo fills its ComboBox list using a database table. The real work is done at design time.

The datCompanies Data control has a RecordSource of Companies, indicating it selects data from the Companies table. This is the main Data control that displays company records.

The datCountries Data control has a RecordSource of Countries, indicating it selects data from the Countries table. This control selects all of the allowed Country values.

The two TextBoxes have DataSource set to datCompanies and DataField values of Name and Description respectively. As the datCompanies control navigates the Countries table, these fields display the current record's Name and Description fields.

The DBCombo has DataSource set to datCompanies and DataField set to Country. As the datCompanies control navigates the Countries table, this control displays the current record's Country field.

The DBCombo has RowSource set to datCountries and ListField set to Name. This tells the DBCombo what choices are allowed. When the user clicks on the DBCombo to edit a record's Country value, the control allows only the Name values selected by the datCountries control.

 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated