|
-
Oct 26th, 2002, 05:46 PM
#1
Thread Starter
Lively Member
Storing a non-numeric ID in a list box
I need to store IDs that have letters in them (e.g. 345H12A) in list boxes. I've used the ItemData field in the past to store numeric data, but I how can I store a combination of numbers and letters?
-
Oct 26th, 2002, 06:21 PM
#2
Frenzied Member
Add them as strings in code
VB Code:
Listbox1.Additem "Your text here"
Mega.
"If at first you don't succeed, then skydiving is not for you"
-
Oct 27th, 2002, 11:34 AM
#3
Thread Starter
Lively Member
I guess I need to clarify things. I'm trying to store BOTH a name (e.g. "John Davis") and and an associated ID with numeric and non-numeric characters (e.g. "A566T2", which is John Davis' ID) in a list box. With a numeric ID, I can store the name with the additem method and store the ID with the ItemData method but I can't do that in this case because of the letters in the ID. Is there some way I can add the name AND the ID in the case?
-
Oct 27th, 2002, 11:55 AM
#4
Frenzied Member
Using a listbox is not the way to do this. If you must use any type of list in this fashion, then use a listview. You can then have the name in the first column and the ID in the second column. You can then reference them independently.
Mega.
"If at first you don't succeed, then skydiving is not for you"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|