Page 1 of 1

Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Wed Mar 02, 2016 8:18 pm
by echo8hink
I have been using Access2Base in my macros to open and close forms. I recently discovered the "Quit()" action and have used it on a Main Menu form in LibreOffice Base. I use the option: Const acQuitPrompt = 0, and it appropriately gives the message box to save before exit and appears to work. However, when I check in the Windows task manager, there are two entries where it shows LibreOffice still in memory.

I am wondering if I missed cleaning something up before using the action of if it's something else. I have removed the action because those memory remnants seem to make LibreOffice unstable and increase the chances of it locking up in mid-app after using it.

-Dave

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Wed Mar 02, 2016 11:01 pm
by Villeroy
Disable the "quick-starter".

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Thu Mar 03, 2016 3:41 am
by echo8hink
The Tools->Options->Memory LibreOffice Quickstarter is not enabled. Would it have anything to do with the DBClose() macro recommended call in Tools->Customize->Events?

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Thu Mar 03, 2016 1:50 pm
by JPL
Could you please try
Code: Select all   Expand viewCollapse view
RunCommand("Quit")

and report us the result ?

Thanks in advance.
JPL

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Thu Mar 03, 2016 9:36 pm
by echo8hink
I replaced the Quit(acQuitPrompt) with RunCommand("Quit") and it cleanly quits with no remnant of LO in memory (Yeah!) when I check with Windows Task Manager. However, when I open the database file it insists on recovering. I also tried closing the form first with mClose() and then quitting and got the same results. I am beginning to think a MsgBox telling the user to "Ctl-Q" may be the best option. It's so easy.

Would it make a difference if the macro was in "My Macros" and not in the .odb file? I may try that...

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Thu Mar 03, 2016 9:39 pm
by RoryOF
Try a delay between the close command and the exit LibreOffice command, to give time for the close to work.

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Thu Mar 03, 2016 10:08 pm
by echo8hink
Tried "Wait 2000". Clearly enough time to see form close and go away. Now LO doesn't close?

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Fri Mar 04, 2016 12:56 am
by Villeroy
Leave the application up and running. I don't know what the problem is but it could be a problem that you try to let a Basic program shut down its own environment.

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

PostPosted: Fri Mar 04, 2016 2:54 am
by echo8hink
I think, for now, I am going to leave it at closing the main menu switchboard form and then letting the user close the Office interface by whatever means is comfortable or usual for them. I thought I had found a way to use a macro action to simplify this, but it seems to be too problematic for now...

thanks all
-hink