Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi column combo box ?

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
HI

does anyone have any tips / code for populating a combo box so that it has about 4 columns worth of data, some of which are hidden? Trying to replicate an access combo box, can see how to do it for 2 columns by using the additem and itemdata methods. But 4 columns ?

Regards

BuilderSPec
 
You can use the ComboBox control from fm20.dll (comes with Office etc) but the dll is not redistributable. See:
for details. There have been many discussions in the forum on this: do a search for fm20 to see some


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
I have done similar things many times. All of mine are from reading recordsets. I just use a Sql statement like:

Select (col1 + ' ' + col2 + ' ' + col3 + ' ' col4) as colist, rowindex from table..............

This, of course just concantenates the columns together with a space. If you want all of the columns to line up and they are not of equal length, it involves more work. In those cases, I use string functions to determine the length and pad spaces as required.

This works well if you just use the first column for display and the rowindex is really what you are going to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top