Database Objects
Hi-Integrity Systems
HomeVB6 Documentation › DBO.ObjectsCollection


ObjectsCollection(ByVal objCollection As IDatabaseObjects) As Collection

ObjectsCollection returns a Collection object containing all of the collection's associated child objects. This function is useful when loading a set of objects for a subset or for creating a For Each enumerator.

'Products class 'Create a For Each Public Function Enumerator() As IUnknown '1. Select Tools > Procedure Attributes '2. Select Enumerator in the Name list '3. Click Advanced '4. Enter -4 in the 'Procedure ID' Static colProducts As Collection Set colProducts = dbo.ObjectsCollection(Me) Set Enumerator = colProducts.[_NewEnum] End Function