you do not have access to the database this time.

2019-08-06 02:08发布

i am new in ms access. Now i have to finish some modifications in ms access 2003. I am getting this error "you do not have access to the database this time. If you proceed to make changes,you may not be able to save them later". Please help me to solve this problem.

4条回答
太酷不给撩
2楼-- · 2019-08-06 02:38

Microsoft has documented the problem, but the sugested solutions were completly unusable in most of my situations. Furthermore the issue occurs even in a split database and it occurrs inconsistently with forms and controls that use code. In my opinion MS got this wrong or at the very least documented incompletly.

Here is my solution: The problem in many instances traces back to Access thinking the DB is in an exclusive mode, when it should be in a shared mode. Setting the DB to "shared mode" under Options doesn't help, because it will revert back to "exclusive" any time a user turns on the "design view" for any object in the database OR makes code modifications OR if a user presses "save" (CTRL + S)!

In order to prevent the error message from poping up, you need to prevent the users from pressing "save" or switching to "design view" in your DB. I have deleted the save button in the Quick Access Toolbar (so users don't see it) and under Options>Current Database I have unchecked "Allow Full Menus". Additionally you can also uncheck "Enable Layout View" in the same menu.

Possibly the Save function can be disabled alltogether, but I have not yet written code for this. This solution is not fool proof, but it greatly reduced the occurence of the problem in my various split and unsplit DBs.

查看更多
走好不送
3楼-- · 2019-08-06 02:48

I was getting this error in ms-access-2010 just the other day. I was working with a method in vb to query the db. I needed to commit my transactions and close the database object after I was done with it at the end of the method. This fixed the problem for me.

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-08-06 02:55

Always open the database in "exclusive mode" when programming and this will never happen.

查看更多
贪生不怕死
5楼-- · 2019-08-06 02:56

This occurs in Access 03 when you are not the only live user present in the .mdw (security) file, if this is a shared database then before making any changes you will need all other users to log out and then to ensure this error doesn't occur again, always open the database in 'exclusive' mode for editing, this is achieved by selecting the little arrow on the open button.

However, you can also have some strange behaviour with .mdw files, if you are genuinely the only user logged in, then I would suggest first logging out, manually deleting the .mdw file if it exists and then going back into the database.

查看更多
登录 后发表回答