Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2006, 08:00 AM
Registered User
Join Date: May 2006
Location: Carriere, MS, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combo List Box

I have a combo listbox question, two parts:

When using a combo list box, normally the items are added to the drop down list by using items.add. Is there a way to have the list of items but not be hard coded into the code or require some type of database? In another language I messed with, there was a string table that would be a part of the application but provided a central location for list items.

Is there a way to associate items in a listbox or combo listbox with an alternative id... example... Alaska... AK... North Carolina... NC... in a list box... the full name of the states would be listed, but the abbreviations of the states would be what is used in something like a filename or textbox. I'm trying to stay away from if...then or case statements that would test for the state name and then equate the abbreviation.
Reply With Quote
  #2 (permalink)  
Old May 30th, 2006, 06:05 AM
Authorized User
Join Date: May 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

What is your data source for the combobox?

You could leave a dataset open in the background with the data
the dataset could containg two columns, abbreviation and text
WY, Wyoming

ds row(0).item(0) is source for combox item(0)
ds row(1).item(0) is source for combox item(1)
ds row(50).item(0) is source for combox item (50)

If combobox item (36) is selected then
populate the textbox with data from
ds row(36).item(1)

I don't know if this what you are looking for.

Reply With Quote

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Msg Box with Combo List Coby Access VBA 4 July 28th, 2007 10:29 AM
IsValidData combo list box function JMichael Visual Basic 2005 Basics 4 June 20th, 2007 11:13 AM
Limiting a combo box to default list hamffjs Excel VBA 1 July 17th, 2006 03:19 PM
Drop Down/Combo box/List in a Form from DB mazimi Classic ASP Basics 2 October 1st, 2004 10:43 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM

All times are GMT -4. The time now is 10:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.