How To Pass A Collection To A FUNCTION ??? (Access 2000) Sample Code Included

M

Mark Dicken

Hi All,

I am trying to Pass A Collection To A FUNCTION ??? (Access 2000)

I have a Class called BO (for Business Objects)

Within BO I have a Function called ShowCollection

Public Sub showcollection(colCollection As Collection)
MsgBox "colCollection(2)=" & colCollection(2)
End Sub

I've tries a whole number of ways and its not working?

The calling code is :-

Dim oCollection As New Collection
oCollection.aaa = "aaa"
oCollection.aaa = "BBB"
oCollection.aaa = "CCC"

Dim oBO As New BO
oBO.showcollection(oBO)

Any IDEAS ???
Many Thanks In Advance ...

Regards

Mark Dicken
England, UK
(Currently Working in Saudi Arabia)
 
M

Mark Dicken

TC,

Sorry it should have been:-

oCollection.add "aaa"

The problem remains with the following line:-

oBO.showcollection(oBO)

Any Ideas ???

Regards

Mark Dicken
 
T

TC

But, what is the problem?

Is it getting an error message, or showing the wrong member of the passed
collection, or what?

TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top