I thought that the on shutdown command would kick in when the close box was checked, but it does not appear to be running. But now that I know this should work, I will try to debug my code further.
Thanks for your help
K
Kevin Delaney Financial Systems Manager CPL Solutions Ltd