>Hello all. I have a timer that forces our Mere Mortals application to close. To ensure a graceful exit, I need to check for any forms open in the application and possibly call their unload/release etc event.
>
>I have seen goApp.oForms.GetFormCount() used, and a FOR loop as such:
>
>>>FOR EACH oForm IN _screen.Forms
>** do some magic to find form name and close it?
>
>
>I am having issues with a graceful (cannot access selected table errors) exit when simply calling OnShutDown() with an open form.
The "cannot access selected table" seems to happen with CodeBook based frameworks - when you close the cursor on which a combo/listbox is based, and then the framework tries to refresh it while closing the form - it tries to requery(), probably, and doesn't find the alias, and you get that error.
I had this problem with VFE, and knowing that MM is also CodeBook by origin, I'd assume it may suffer from the same problem. You may just try to set all combos' and listboxes' rowsource to "" somewhere in form's destroy() or unload() (whichever fires first). Too bad this didn't cross my mind six years ago when I had that problem - now I can't try it out.