Retrieve Value Using Key From a Collection in Access 2000

Posted by Mikecancook on Stack Overflow See other posts from Stack Overflow or by Mikecancook
Published on 2010-04-29T18:14:08Z Indexed on 2010/04/29 18:17 UTC
Read the original article Hit count: 290

Filed under:
|

I know this is a simple question but it's aggravating me. If I have a key/value pair in a collection but I can't seem to get the value out using the key. I can get the key using the value but not vice versa. Is there some magical way to accomplish this?

For example:

Dim CycleList As Collection
Dim Value as String
Set CycleList = New Collection
CycleList.Add 1, "Some Value"


Value = CycleList(1)

I've also tried CycleList.Item(1) and it's the same result, Value = 1.

© Stack Overflow or respective owner

Related posts about ms-access

Related posts about access-vba