What I wanted you to try is setting the Collection object to NULL before releasing the form to see if that resolves the problem.
>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.
Mark McCasland
Midlothian, TX USA