Multi Column Combox (1 Viewer)

Ryobi

Registered User.
Local time
Today, 18:05
Joined
Mar 5, 2012
Messages
49
Does anybody know how to get multi columns in combo box ? I search on the net but so far no answer. There was one that had the code, but it did not explain as to how to compile the code and using in the program. I have also saw a video on youtube that had a DLL file, but it does show where to get not ? Does any body has any suggestions ?



Thank you
 

RuralGuy

AWF VIP
Local time
Today, 17:05
Joined
Jul 2, 2005
Messages
13,826
Have you tried using the wizard to create the combo box?
 

moke123

AWF VIP
Local time
Today, 19:05
Joined
Jan 11, 2013
Messages
3,852
or have you tried adjusting the column counts and column widths?
0 width will hide a column and anything else (>0) will show it.
 

Ryobi

Registered User.
Local time
Today, 18:05
Joined
Mar 5, 2012
Messages
49
By wizard do you mean the toolbox ? Thanks for the suggestion, but my problem not in creating combo box but with the columns that the combo box will have. The comb box has only have one column and I it did to have more then on like in Access. I have seen a sample where they put data in single column and use "|" as divider for the data, but is it still one column and the when data is extracted form the database and loading into the combo box it will be messy because it goes into only column and only one line is used to load the data into the combo box.
 

Ryobi

Registered User.
Local time
Today, 18:05
Joined
Mar 5, 2012
Messages
49
monke123,


In Vb.net there column count like in Access, at least I did not see one that is part of the problem with the combo box in Vb.net has only one column.
 

isladogs

MVP / VIP
Local time
Today, 23:05
Joined
Jan 14, 2017
Messages
18,186
Open the form in design view & select the combo.
Now go to the Format tab on the property sheet and change the column count & column widths as suggested above



EDIT:
Oops - sorry - the above is for Access not VB.Net. Do you have something similar?
 

Attachments

  • Capture.PNG
    Capture.PNG
    9.4 KB · Views: 982

Ryobi

Registered User.
Local time
Today, 18:05
Joined
Mar 5, 2012
Messages
49
isladogs,

Thank you for for the suggest, but the photo is for Msaccess. I need the one for Vb.net. Perhaps I have posted the question in the wrong forum.


Thank you
 

isladogs

MVP / VIP
Local time
Today, 23:05
Joined
Jan 14, 2017
Messages
18,186
No it was my error. Realised immediately i'd posted. See comment below the screenshot.
 

Ryobi

Registered User.
Local time
Today, 18:05
Joined
Mar 5, 2012
Messages
49
Re: Multi Column Combox - Changing text in combo box

For moment I am doing a working around the issue by using a "|" between items to divide the single column into multiple columns. When I did this I ran into the issue that when the item is selected the whole column is displayed on the text box when I only need first column. I used the 10 bytes for the first column and I able to extract the data by I can not seem to put this value into the combo box text value. I have tried it various events of the combo box, but no luck so far. Below is an example of the the items in the drop down look like.



Bundy | AL
Dylan | Bob
Bean | Mr.


When I select an item for Example Bundy | AL, I want only Bundy to appear on the Combo box text as the select item, not Bundy| AL. The reason that I want this is because I will searching in the database for that field base on the text of that field.


Does anybody know to fix this problem ?
 

Ryobi

Registered User.
Local time
Today, 18:05
Joined
Mar 5, 2012
Messages
49
Yes, that is what I exactly what I need. I will tried it latter tonight when I get home. Thank you,
 

Users who are viewing this thread

Top Bottom