Populate multicolumn combobox

I

icccapital

I found some articles for excel comboboxes that say to fill an array and then
assign the array to myCombobox.List = myArray, but in access there is no list
property for a combobox. Access help talks about using the column property to
populate the combobox, but all the ways I have tried give me errors.

Is there an easy way to do this?

Thanks
Access 2007
 
M

Marshall Barton

icccapital said:
I found some articles for excel comboboxes that say to fill an array and then
assign the array to myCombobox.List = myArray, but in access there is no list
property for a combobox. Access help talks about using the column property to
populate the combobox, but all the ways I have tried give me errors.

Is there an easy way to do this?


Databases are very different from spreadsheets. Databases
use tables to store data and queries to retireve selected
fields and records. The easy way in Access is to set a
combo/list box's RowSourceType to Tab;e/Query and the
RowSource property to a query that retrieves the desired
stuff.

If the combo/list box's RowSourceType is set to Value List,
you can enter your list of values directly in the RowSource
property. But this is only of marginal value because it
embeds data values in the control instead of a table where
data belongs.
 
J

John W. Vinson

I found some articles for excel comboboxes that say to fill an array and then
assign the array to myCombobox.List = myArray, but in access there is no list
property for a combobox. Access help talks about using the column property to
populate the combobox, but all the ways I have tried give me errors.

Is there an easy way to do this?

Thanks
Access 2007

By far the most common way to manage the data in a combo box (or listbox) in
Access is to base it on a Query. The query can have multiple fields (which
will show up as columns when the combo is dropped down); you can change the
data displayed in the combo by changing the criteria of the query or by
editing the data in the table.

What specifically are you trying to accomplish? What do you want the combo to
show?
 
M

Microsoft Access

I think I realized my mistake. I have a form with a bunch of bound controls
on it. One of those was a combo box that pulled data from one table and yet
was bound to the field of a linked table. I am changing the form so that it
is all unbound so I can manage the updating of the database differently and
I was trying to unbind the combobox by filling it in VBA. But I realize now
that I should just have the rowsource still be the table, but remove the
bind.

Really stupid. Thanks for the thoughts and the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top