|
-
Aug 24th, 2001, 08:49 AM
#1
Thread Starter
Frenzied Member
Listview Question - What is the key parameter? Error not unique key given
I have a listbox and allow certain files to be dropped on and addedd with other info in columns. When I add two of the same files, I get an error saying the key is not unique in the collection. What is the key exactly? So I decided to change the key from the first example to the second below making the time the key if that would work and it does not. It says invalid key. I need to be able to add duplicate info to the listview control.
Can someone help? I appreciate it!!!!
Get error of not a unique key when duplicate data is added.
Set lstItem = listview1.ListItems.Add(, text1.text, text1.text)
This example errors as invalid key.
Set lstItem = listview1.ListItems.Add(, Format(Time, "hhmmss"), text1.text)
-
Aug 24th, 2001, 08:52 AM
#2
Member
A Key is a unique string that identifies elements in the ListView, not in a ListBox.
-
Aug 24th, 2001, 08:53 AM
#3
Thread Starter
Frenzied Member
Why would I get an error on using the time as the key in the example I gave? What do you suggest to solve this and allow duplicate info to be added to the listview control?
Thanks!
-
Aug 24th, 2001, 08:54 AM
#4
Member
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
|