Use the ColumnWidths property. Setting a column to 0 (zero) makes it
invisible. The first visible column is the one that will be displayed in the
combo box when the dropdown list is not open.
> Here's an "easy" question, I'm sure. How do I get a combo box to display a
> different value than the field it is bound to?
>
> Thanks
> T
Thank you. But when I try to do that, Access tells me the visible column has
to be limited to a list. I want a constrained list, but I need to be able to
add values to it. I don't see why that should be a problem.
Please help.
Thanks.
T
> Use the ColumnWidths property. Setting a column to 0 (zero) makes it
> invisible. The first visible column is the one that will be displayed in
[quoted text clipped - 5 lines]
>> Thanks
>> T
Ken Snell (MVP) - 12 Aug 2006 17:20 GMT
Post the values of these properties from the combo box:
RowSource
RowSourceType
BoundColumn
ColumnCount
ColumnWidths
If the RowSource is a query name, post the SQL statement of the query. If
the RowSource is a table name, post the field names of the table.

Signature
Ken Snell
<MS ACCESS MVP>
> Thank you. But when I try to do that, Access tells me the visible column
> has to be limited to a list. I want a constrained list, but I need to be
[quoted text clipped - 14 lines]
>>> Thanks
>>> T
T Payne - 12 Aug 2006 18:14 GMT
Thanks. Here are the answers to your questions:
RowSource SELECT [PersonID], [Name] FROM [People];
RowSourceType Table/Query
BoundColumn 1
ColumnCount 2
ColumnWidths 0";1.5"
Limit To List yes
(It won't let me set the "Limit To List" to "No" -- which is my problem).
> Post the values of these properties from the combo box:
>
[quoted text clipped - 25 lines]
>>>> Thanks
>>>> T
Ken Snell (MVP) - 12 Aug 2006 21:58 GMT
You cannot set Limit To List to "no" unless the BoundColumn is the first
visible column. The reason is this: The BoundColumn is the value of the
combo box; the other columns are just there for display purposes. Thus, if
you want to enter a new value, and you enter the value that corresponds to a
column that is there just for display purposes, ACCESS has no way of knowing
what the value of the BoundColumn should be for that new entry because
you're not providing it in the combo box.
The way to do what you seek is to pop up a form when a new entry is made
that isn't on the list, and let the user enter the new data into that popup
form, save the data to the table where the data are stored, close the form,
and requery the combo box so that the new data are included in the combo
box's list of info. See this article at The ACCESS Web for info about this:
http://www.mvps.org/access/forms/frm0015.htm

Signature
Ken Snell
<MS ACCESS MVP>
> Thanks. Here are the answers to your questions:
>
[quoted text clipped - 36 lines]
>>>>> Thanks
>>>>> T
T Payne - 12 Aug 2006 23:56 GMT
Thank you. I found the needed code on the website you provided.
T
> You cannot set Limit To List to "no" unless the BoundColumn is the first
> visible column. The reason is this: The BoundColumn is the value of the
[quoted text clipped - 54 lines]
>>>>>> Thanks
>>>>>> T
Ken Snell (MVP) - 12 Aug 2006 17:20 GMT
To add to the post I just made, also post the value for the Limit To List
property.

Signature
Ken Snell
<MS ACCESS MVP>
> Thank you. But when I try to do that, Access tells me the visible column
> has to be limited to a list. I want a constrained list, but I need to be
[quoted text clipped - 14 lines]
>>> Thanks
>>> T