Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 23rd, 2003, 03:53 AM
amidala amidala is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Bukit Kerinchi
Posts: 12 amidala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
combo box columns

hi all,

I need to add 2 categories into a combo box, that means i need to have a combo box with 2 columns. I use the recordset method to move the values in the database into the combobox but i can't get the combo box to divide into 2 columns.

i need to separate the values into 2 columns because only the item in the 1st column will be the bound value.

another thing is, VB 6.0 that i'm using doesn't seems to recognize the word 'column' and 'ColumnCount' although there is an example on the help menu that uses these words.

i'm using the code below to get 2 values into 1 row of the combobox but this did not solve the problem on the bound value.

qryVar=recset!JobName & " " & recset!JobID
ComboBox.AddItem (qryVar)

Reply With Quote
  #2  
Old August 23rd, 2003, 04:46 AM
zak2zak zak2zak is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Singapore
Posts: 34 zak2zak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to zak2zak
Lightbulb May I comment....

May be this helps...
ComboBox control do not have th column property!
If U want to add two item in the same list in combobox
U can use the .ItemData. But it only accept Numbers / Long / Integers.
If u'r recset!JobID Type is Number/Long/Integers then
Try to use this:
Code:
With ComboBox
.AddItem recset!JobName
.ItemData(.NewIndex) = recset!JobID
End With
__________________
I May Have Misinterpret U'r Post
Correct Me If I Am Wrong......//
Enjoy Coding..........................///

zak2zak

Reply With Quote
  #3  
Old August 25th, 2003, 01:01 AM
amidala amidala is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Bukit Kerinchi
Posts: 12 amidala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks zak2zak,

The job ID type is Text. So I guess I can't use that one.......

Reply With Quote
  #4  
Old August 25th, 2003, 02:32 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,790 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 14 h 29 m 54 sec
Reputation Power: 746
There is an example of how to make your own multi-column combo at www.mvps.org/vb

There are 3rd party multi-column combos. I wish the Access combo was available for VB myself

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > combo box columns


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway