If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > how to choose max from combobox vb.net

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-25-10, 00:47
awaisdar001 awaisdar001 is offline
Registered User
 
Join Date: Dec 2010
Posts: 21
Question how to choose max from combobox vb.net

i want to choose the maximum value from the combo box in the vb.net.?
i have items already added. so i want to take a decision to take largest of them when i have integer data only.
Reply With Quote
  #2 (permalink)  
Old 12-25-10, 02:33
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
iterate through the combo box
forget the details
look at the combo box properties and iterate though the collection holding the values
bear in mind the columns property starts at base 0 so if you have two columns per row in the combo the first column is actually column(0)
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 12-25-10, 17:14
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
What did you bind the combo box to?
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #4 (permalink)  
Old 12-26-10, 02:53
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
of course the 'other' technique would be to declare a form variable andset that to the maximum value each time you tinker with the combo box
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 01-14-11, 06:54
corncrowe corncrowe is offline
Registered User
 
Join Date: Aug 2004
Location: Dallas, Texas
Posts: 347
Try listindex(-1) <-- puesdo code....
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On