locked
You do not have exclusive access to the database... RRS feed

  • Question

  • I have a split front-end back-end database app that I've been developing over the last 18 months in A2010. I get the above message "You do not have exclusive access to the database...any changes may not be saved..." as soon as I start editing my VBA code. Access won't let me exit unless I cancel the edits. There are no other users on either database at the time. What has changed -- I recently added an unbound textbox to my main menu in which I display a value updated in Form_Open from a DLookup call to the BE database. Why would this lock up the database and how can I avoid the problem?


    Darrell H Burns

    Friday, March 23, 2012 5:26 PM

Answers

  • I recently added an unbound textbox to my main menu in which I display a value updated in Form_Open from a DLookup call to the BE database. Why would this lock up the database and how can I avoid the problem?


    So if you take this out it works normal again? or still the same issue even when removed?

    Use a copy to test. If you can assert the issue to the DLookup...

    Or you can try the old  /Decompile switch, then compile again. I am still amazed at the things this fixes.


    Chris Ward

    Saturday, March 24, 2012 3:24 AM

All replies

  • Try opening the frontend exclusively when you want to edit forms, reports or code: in Access, select File > Open, select the database, then click the arrow on the right hand side of the Open button and select Open Exclusive from the dropdown menu.

    Regards, Hans Vogelaar

    Friday, March 23, 2012 6:06 PM
  • It could be that there is a lock file applied to the db from where a copy was not closed properly. You'll have to look for the lock file and delete it. If it is on your desktop then you can just trash it. If it is on the server you'll have to locate it in the folder on the server where the Frontend exists to delete it. Make sure it is a lock file you're deleting though. And make sure you're not deleting one that is currently being used.

    Or maybe I'm just talking gibberish.


    Chris Ward

    Friday, March 23, 2012 8:27 PM
  • No gibberish, Chris. That's a totally appropriate suggestion. In my case, however, there's no lock file issue.

    Thanx for the idea.


    Darrell H Burns

    Friday, March 23, 2012 11:39 PM
  • Yes Hans, that worked. But it doesn't solve the problem. It throws the same error when I reopen it in standard mode.

    Darrell H Burns

    Saturday, March 24, 2012 12:38 AM
  • I recently added an unbound textbox to my main menu in which I display a value updated in Form_Open from a DLookup call to the BE database. Why would this lock up the database and how can I avoid the problem?


    So if you take this out it works normal again? or still the same issue even when removed?

    Use a copy to test. If you can assert the issue to the DLookup...

    Or you can try the old  /Decompile switch, then compile again. I am still amazed at the things this fixes.


    Chris Ward

    Saturday, March 24, 2012 3:24 AM
  • Well, the decompile did it. Go figure.

    Darrell H Burns

    Monday, March 26, 2012 2:27 PM