Hi Mark
Here is the code creating the objects and collection. As you can see the objects added to the collection contain one property called name, which is the name from the record in the selected customer table. If more that one object is added to the collection the tables opened by the form won't close when the form is released.
loRecordDetails = CREATEOBJECT("Empty")
ADDPROPERTY(loRecordDetails,"Name","")
SELECT Customer
SCAN FOR lSelect
loRecordDetails.Name = Customer.Name
loSelectedCustomerCollection.Add(loRecordDetails)
ENDSCAN
>Yes but is any of the properties in the objects added to the collection class holding a reference to something? Maybe try to set the property or memvar that is holding your collection object reference to NULL before releasing the form.
>
>>I have creating a collection in a method of a form. If I add more than one object to it the form won't release properly. The objects added are just an empty class with one property added.
>>
>>The collection is not referenced anywhere.
>>
>>Any ideas why the form is not releasing properly?
>>
>>Thanks
>>
>>John