From: icccapital on
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
From: Marshall Barton on
icccapital wrote:

>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.

--
Marsh
MVP [MS Access]
From: John W. Vinson on
On Tue, 23 Mar 2010 07:52:10 -0700, icccapital
<icccapital(a)discussions.microsoft.com> wrote:

>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?
--

John W. Vinson [MVP]
From: Microsoft Access on
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.

"John W. Vinson" <jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote in message
news:7srhq5ds6lf6miv3ra07rcskvg9ek8cgj9(a)4ax.com...
> On Tue, 23 Mar 2010 07:52:10 -0700, icccapital
> <icccapital(a)discussions.microsoft.com> wrote:
>
>>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?
> --
>
> John W. Vinson [MVP]