Programatically control a combobox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

As an avid VB programmer, I am accustomed to programming the combobox to
load the list and simulate the mouse click buy traversing the items in the
list, then selecting one. However it seems as if this ability does not exist
in Access 2000. I am missing something?
 
To set the value of a combo, just assign its Value, e.g.:
Me.MyCombo = "TX"

The items in the combo's list usually come from a table in Access. Just set
the combo's RowSource property to the name of the table or query.

In cases where you don't want to create a table, you can just use a Value
List as the RowSourceType. The RowSource is then a list of the items,
delimited by semicolons.

Another difference with the VB text box is that an Access combo can have
multiple columns. The first non-zero-width column is the one that shows, and
the Bound Column determines the Value of the combo (usually written to the
field nominated in its Control Source property).
 
Allen,

Thanks. But what if i want to load set the RowSource to a sql string, or
load the items myself from a recordset?

Ken.
 
Back
Top