Form Close - Invalid Parameter error

When I close a form, I get an error message 'Invalid Parameter'
The form has lots of components, some getting data from a datamodule.
I disabled all controls from the queries, and made all queries
inactive before closing, but still this dreaded message.
Any idea how to find out what causes it please?
Thank You
Johan Smit