Combo Box Question

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

Guest

Can I have a combo box bound on the first column but display only the second
column ?

Thanks !
 
Yes, set the Column Widths property so that the first column has a width of
zero.
 
Thanks Ken....I have a follow-up question:

Is there a way to have a combo box as described below, with the first coulmn
width = 0, to have the limit to list property set to No ? When I try that I
get an error message stating "Microsoft Access can't set the LimitToList
property to No right now....the first visible column, isn't equal to the
bound column"

Any thoughts on that ?

Thanks again !
 
No, you cannot change that requirement. The reason is this: the user sees
the first visible column in the "textbox" portion of the textbox, and this
is the "data" that the user can type into that box. If the first visible
column is not the bound value, then ACCESS will not have a value for the
"bound column" when the user types in a "new" value.

For example, suppose the first column (bound column) is the Primary Key ID
for the record and the second column (the first visible column) is a Name.
The user types in "Ken", which is not in the table. What Primary Key ID
value would ACCESS assign to the new record -- all it knows is that you
typed in "Ken" as a new Name.

In this situation, the best solution is to set Limit To List to Yes, and
either use the NotInList event (evern better, use a button that the user can
click when wanting to add a new value) to add a new record via a popup form.

--

Ken Snell
<MS ACCESS MVP>
 
Your explanation makes perfect sense....and I do understand the NotInList /
pop-up form option your suggested.

Thanks for your help !
 
Back
Top