Determine Column Width and Bound Column

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

Guest

How Do I determine Column width in a combobox.
The first field SHipId not to be shown
Second Field is the Company Name
Third Field is the Address
Fourth Field City,State and Zip

What would the bound Column be?

I am also using Limit To List = No
 
How Do I determine Column width in a combobox.

You don't "determine" it; you *set* it to whatever values you want.
The first field SHipId not to be shown

Then its width should be 0.
Second Field is the Company Name
Third Field is the Address
Fourth Field City,State and Zip

What would the bound Column be?

That depends entirely on what you want stored in the table. I would
GUESS that you want to store the ShipID, so the bound column should be
1 (and the Control Source should be [ShipID] or whatever field in this
table links to ShipID). What's the table upon which this combo is
based? Does each ShipID have its own Company Name, Address, etc.? Why
is it "ShipID" instead of CompanyID? I'm wondering what real-life
entity this combo is selecting!
I am also using Limit To List = No

You can't, and shouldn't. Limit to List = No means "I want the user to
be able to pick the values I've supplied, but if they don't like the
choices, they can type anything else that they want into the field".
Since they cannot even SEE the ShipID, much less type one in, you must
leave Limit to List set to Yes. This will let the user enter only
records which already exist in the combo box's Row Source table.

What you can do, if need be, is to use the combo's On Not In List
event. If the user types a company name which is not recognized (since
that's the first visible field), the Not In List event's VBA code will
be executed. This code could pop up a form allowing the user to enter
a new Company Name, Address, City, State, and Zip, and return the
(newly generated) ShipID to your table.

It's possible you're using the combo in a way that it's not designed
to work. Could you explain what you want to see happen when the user
selects a value?

John W. Vinson[MVP]
 
Back
Top