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

  • Thread starter Thread starter Mark Dicken
  • Start date Start date
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)
 
TC,

Sorry it should have been:-

oCollection.add "aaa"

The problem remains with the following line:-

oBO.showcollection(oBO)

Any Ideas ???

Regards

Mark Dicken
 
But, what is the problem?

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

TC
 
Back
Top