Answered by:
MS Access locking_1

Question
-
I have faced some weird incidence while using MS Access database. The database I refer to is a house made a database, being used by one user. f It does not consist of any special Macros, VBA coding, etc. Only standard functions that are developed by MS were used.
The essence of the problem is that in wake of some reasons the Access change database’s locking logic as follows:
· Password is applicable for entry to the database; but
· The MS Access doesn't allow me to change the password;
· It considers database as unlocked; When I am trying to encrypt database it requests to "set database password"
· Some functions like "backup" and "compact&repair" are locked by password, although it shouldn’t be locked.
It is second times the similar incidents have happened. Transferring all elements from "previous" database to the “new” one I can keep utilizing the new database for some time without any problems but then suddenly the locking explained above is activated again somehow.
Maybe someone knows what can be a cause for such strange behaviour of software?
Below is the link to the database
(password asg ). it is empty now so you can be used for exercises.
https://1drv.ms/u/s!ArcNksqVtK7dijDAS1iazzzGBdOf- Changed type Edward8520Microsoft contingent staff Monday, September 18, 2017 1:54 AM It's a question
Saturday, September 16, 2017 5:07 PM
Answers
-
Hi Peter Btkvch,
Please try to run below code in another database module to remove the database's password.
Option Compare Database Public Function removeDBPassword() As Boolean On Error GoTo ErrHandler Dim wkSpc As Workspace Dim db As Database Set wkSpc = CreateWorkspace("", "Admin", "", dbUseJet) Set db = wkSpc.OpenDatabase("C:\Users\v-guaxu\Desktop\NOC_Mdb_v.02.2017 (3).accdb", True, False, ";pwd=asg") db.NewPassword "asg", "" removeDBPassword = True cleanup: Set db = Nothing Set wkSpc = Nothing Exit Function ErrHandler: MsgBox Err.Description End Function
Best Regards,
Terry
- Proposed as answer by Terry Xu - MSFT Tuesday, September 19, 2017 5:33 AM
- Marked as answer by Peter Btkvch Wednesday, September 20, 2017 2:16 PM
Monday, September 18, 2017 5:09 AM
All replies
-
Hi Peter Btkvch,
Please try to run below code in another database module to remove the database's password.
Option Compare Database Public Function removeDBPassword() As Boolean On Error GoTo ErrHandler Dim wkSpc As Workspace Dim db As Database Set wkSpc = CreateWorkspace("", "Admin", "", dbUseJet) Set db = wkSpc.OpenDatabase("C:\Users\v-guaxu\Desktop\NOC_Mdb_v.02.2017 (3).accdb", True, False, ";pwd=asg") db.NewPassword "asg", "" removeDBPassword = True cleanup: Set db = Nothing Set wkSpc = Nothing Exit Function ErrHandler: MsgBox Err.Description End Function
Best Regards,
Terry
- Proposed as answer by Terry Xu - MSFT Tuesday, September 19, 2017 5:33 AM
- Marked as answer by Peter Btkvch Wednesday, September 20, 2017 2:16 PM
Monday, September 18, 2017 5:09 AM -
Bingo.The magic has happened.
Thanks Terry for the code. May I ask whether the bug can be eliminated or I need to reconcile with it?
Monday, September 18, 2017 5:28 PM -
Hi Peter Btkvch,
I'm glad to hear that the code could help you. For your issue, since I failed to generate such a database file, I would suggest you go to File->Feedback to submit a feedback to report your issue. Thanks for your understanding.
Best Regards,
Terry
Tuesday, September 19, 2017 5:39 AM -
Hi Terry,
The report has been to developers. Thanks again.
Tuesday, September 19, 2017 1:20 PM -
Hi Peter Btkvch,
It seems that your original issue has been solved. I would suggest you mark useful reply to help other developers to use this forum. If you have any other issue, please feel free to post threads to let us know. Thanks for understanding.
Best Regards,
Terry
- Marked as answer by Peter Btkvch Wednesday, September 20, 2017 1:43 PM
- Unmarked as answer by Peter Btkvch Wednesday, September 20, 2017 2:16 PM
Wednesday, September 20, 2017 8:20 AM