Go Back   Access World Forums > Apps and Windows > VB.NET

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-21-2019, 08:31 AM   #1
Ryobi
Newly Registered User
 
Join Date: Mar 2012
Posts: 33
Thanks: 1
Thanked 1 Time in 1 Post
Ryobi is on a distinguished road
Multi Column Combox

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

Ryobi is offline   Reply With Quote
Old 04-21-2019, 08:41 AM   #2
RuralGuy
AWF VIP
 
RuralGuy's Avatar
 
Join Date: Jul 2005
Location: @ 8300' in the Colorado Rockies
Posts: 13,820
Thanks: 7
Thanked 311 Times in 301 Posts
RuralGuy is just really nice RuralGuy is just really nice RuralGuy is just really nice RuralGuy is just really nice RuralGuy is just really nice
Re: Multi Column Combox

Have you tried using the wizard to create the combo box?
__________________
(RG for short) aka Allan Bunch Previous MS Access MVP acXP, ac07, ac10, ac13 - WinXP Pro, Win7 Pro, Win10 Pro
Please post back to this Forum so all may benefit.
Teaching is not filling a bucket but lighting a fire.
RuralGuy is offline   Reply With Quote
Old 04-21-2019, 08:51 AM   #3
moke123
Me.Dirty=True
 
moke123's Avatar
 
Join Date: Jan 2013
Location: Massachusetts
Posts: 722
Thanks: 1
Thanked 221 Times in 207 Posts
moke123 will become famous soon enough
Re: Multi Column Combox

or have you tried adjusting the column counts and column widths?
0 width will hide a column and anything else (>0) will show it.

moke123 is offline   Reply With Quote
Old 04-21-2019, 09:01 AM   #4
Ryobi
Newly Registered User
 
Join Date: Mar 2012
Posts: 33
Thanks: 1
Thanked 1 Time in 1 Post
Ryobi is on a distinguished road
Re: Multi Column Combox

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 is offline   Reply With Quote
Old 04-21-2019, 09:08 AM   #5
Ryobi
Newly Registered User
 
Join Date: Mar 2012
Posts: 33
Thanks: 1
Thanked 1 Time in 1 Post
Ryobi is on a distinguished road
Re: Multi Column Combox

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.
Ryobi is offline   Reply With Quote
Old 04-21-2019, 09:08 AM   #6
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 9,740
Thanks: 107
Thanked 2,636 Times in 2,414 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: Multi Column Combox

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?
Attached Images
File Type: png Capture.PNG (9.4 KB, 90 views)
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 04-21-2019, 09:13 AM   #7
Ryobi
Newly Registered User
 
Join Date: Mar 2012
Posts: 33
Thanks: 1
Thanked 1 Time in 1 Post
Ryobi is on a distinguished road
Re: Multi Column Combox

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

Ryobi is offline   Reply With Quote
Old 04-21-2019, 09:39 AM   #8
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 9,740
Thanks: 107
Thanked 2,636 Times in 2,414 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: Multi Column Combox

No it was my error. Realised immediately i'd posted. See comment below the screenshot.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 04-21-2019, 04:10 PM   #9
Ryobi
Newly Registered User
 
Join Date: Mar 2012
Posts: 33
Thanks: 1
Thanked 1 Time in 1 Post
Ryobi is on a distinguished road
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 is offline   Reply With Quote
Old 04-22-2019, 08:26 AM   #10
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 194
Thanks: 317
Thanked 16 Times in 16 Posts
Tera is on a distinguished road
Re: Multi Column Combox

https://social.msdn.microsoft.com/Fo...orum=vbgeneral

is it what you're trying to do?
Tera is offline   Reply With Quote
Old 04-22-2019, 09:09 AM   #11
Ryobi
Newly Registered User
 
Join Date: Mar 2012
Posts: 33
Thanks: 1
Thanked 1 Time in 1 Post
Ryobi is on a distinguished road
Re: Multi Column Combox

Yes, that is what I exactly what I need. I will tried it latter tonight when I get home. Thank you,

Ryobi is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List boxes: single column vs multi column scubadiver007 Forms 6 04-04-2013 04:43 AM
validation field based on combox box column data kitcheong Forms 1 03-13-2012 12:38 AM
Multi-Column Indexes Djblois Queries 3 08-19-2010 09:41 AM
Multi Column Report - show first column only once bharlow Reports 4 07-20-2010 10:55 AM
Solved Multi column list box DBL General 3 09-04-2008 05:04 AM




All times are GMT -8. The time now is 06:37 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World