collection problem 
Author Message
 collection problem

Hi,

I've got a problem using user collections in Access 8 modules.
When you add an item to a collection, you can specify a string key wich can
be used
later to get the item in the collection (like
MyCollection("TheKey").MyProperty ).
My problem is that I'd like to get the key of an item already added.
The following exemple illustrates what I try to do :

    Public Sub MyExemple ()

        Dim MyCollection as New Collection

        ...

        MyCollection.Add MyObject, "TheKey"

        Debug.Print MyCollection(1).Key

        ...

    End Sub

Unfortunatly, The "Key" property is not available with items. And, in my
code, I can't add a "Key" property to the MyObject object.

--
Sorry for my english, I'm a french developer.
--------------------------------------------------------
Vincent

http://www.*-*-*.com/ ~skrol29/
--------------------------------------------------------



Sat, 22 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Links Collection Problem

2. hyper links collection problem?

3. collection problems...

4. Collection Problem

5. Collection Problem

6. Collection Problem - Possible Bug?

7. Collection Problem

8. classes and collection problem

9. rdoConnection's rdoTables collection problem?

10. VB4-32 / Access 2.0 - Fields Collection Problem

11. Collection Problem

12. Forms collection problem

 

 
Powered by phpBB® Forum Software