MSAccess Does Not Close Under Windows 11

Bill Bordiuk 1 Reputation point
2022-05-10T22:13:04.713+00:00

I'm using the Access 2010 runtime for some applications I support. These applications run fine under Windows 10 but when I run them under Windows 11 the MSAccess executable still runs in the background when I quit the application using DoCmd.Quit. I've noticed that this happens any time a form is open that runs any VBA code. Is this a know issuer with Windows 11? I've seen similar issues with Office 365 but this is with the runtime version.

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
877 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pete de Greet 1 Reputation point
    2022-09-12T09:21:02.27+00:00

    Are you calling DoCmd.Quit in a Form (or with a Form opened) with a OnClose sub which queries records in the database?
    In my case: A Button on 'Mainform' triggers DoCmd.Quit, but I had some code in the OnClose sub writing logout details to the database. This worked fine on Windows 10, on Windows 11 the DB would not close.
    Adding
    DoCmd.Close acForm, "Mainform"
    before
    DoCmd.Quit
    did the trick.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.