RemoteServer problem when close the main form

Hi,
I tried to update lock record when close the main form. But I got the following error.

I tried to update the record when ClientDataModule destroy. It doesn’t trigger destroy event.

Hi,

looks like, some components are already destroyed.
try to use OnClose event or similar instead

Thanks for you advise. I solved the problem.