Search

"Not a Valid Password - Runtime Error 3031" Excel ADO VBA Error Message even when password are correctly entered

Are you receiving "Not a Valid Password - Run-time Error 3031" Excel ADO VBA Error Message  even when correct password are updated / passed in the argument?

You will encounter this error if you’ve have done MS office/Access upgrade from 2007 to 2010/2013/2016. Existing Code and databases should work.

If you’re creating new database and setting a password  or changing the password of existing database using new office (MS ACCESS) you’ll face this issue when connecting via VBA ADO.

Follow below steps to troubleshoot this issue:

1. Fire up Access application (any access file)
2. Click on File and then Options
3. Click on Client Settings
4. Go to Advanced section and check "use legacy encryption (good for reverse compatibility and multi-user database)"
5. Restart Access (by closing all access database currently)
6. Set new password
7. Run your ADO Code to connect to database. It should be working now.

'-----------------------------
'Please visit our channel for a quick explainer on this code.
'Feel free to update the code as per your need and also share with your friends.
'Channel: Youtube.com/vbaa2z
'Download free codes from http://vbaa2z.blogspot.com
'Autor: L Pamai (vbaa2z.team@gmail.com)
'-----------------------------




No comments:

Post a Comment

Note: only a member of this blog may post a comment.