Cannot successfully change the ColumnCount or ColumnWidths of a Combo Box after it is

llyal

Registered User.
Local time
Today, 13:08
Joined
Feb 1, 2000
Messages
72
Cannot successfully change the ColumnCount or ColumnWidths of a Combo Box after it is used in a form

Interesting thing i want to do to a combo box- I want to change the combo box parameters so that I can see the bound column- but only when I press a Command Button. All other times, I don't want to see the bound column.

My combo box has one bound column (normally hidden) and one "choices" column. It is bound to a field in a recordset, and when i use a continuous form or datasheet to view data, the configured combo box will show meaningful descriptions instead of IDs (which is the bound column)

I was thinking that it would be straightforward to change the ColumnCount or ColumnWidth, requery the combo, refresh the form, and I would be able to see whatever combo box column I wanted. No deal.

I have a workaround ready, but would like to know from the experienced programmers, if what I am trying to do is possible (with reasonable effort)?

Thank you!

--llyal
 
the column count doesn't display columns unless your record source has that many columns.

I'd guess that the recordsource for your combobox is one one column.
 
Pat,

So re-arranging the fields in the combo is the key; that just trying to expose the bound column (the ID) of the combo cannot be done? That is odd behavior.

--llyal
 
I have actually had the same problem, and was hoping someone may know how to do this correctly.

I have a combo-box that is populated by different tables based on another combo-box.

Eg:
Select Case strCriteria

Case "WIP"
'choose WIP table to populate combo-box
'put 3 columns in box
'make widths 1,2,3

Case "RAW"
'Choose RAW table to populate combo-box
'Put 2 columns in box
'make widths 2,4

etc.

I was unable to successfully change the number of, and widths of the columns in the combo-box.

(I probably should make my own topic, but I figure our questions are related)

Duane Barker
 

Users who are viewing this thread

Back
Top Bottom