open accdr file protected with database password

Anonymous
2013-08-21T12:29:22+00:00

Hi dear

how can I open accdr file protected with database password  by another one accdb file (with VBA code) ?

regard

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

47 answers

Sort by: Newest
  1. Anonymous
    2013-09-06T08:05:40+00:00

    Hi dear

    Thanks for going to continue to look into this

    and

    1-can you give me a way to open it with shell command , when rename it to accdb format where it has database password ?

    2-in your previous cod , "oAccess.Visible = True" is not work correctly , it means that it can't hide the database window , why?

    regard

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-09-05T20:31:45+00:00

    2- OpenCurrentDatabase method can't open accdr file format.

    Drat!  I didn't realize that, but I see that you are right.   Even though an .accdr file is just the same as an .accdb format with the file-extension changed, Access refuses to open it using OpenCurrentDatabase.  That's annoying.

    I'm going to continue to look into this, but while I do, I can think of one rather crazy solution:  have the code temporarily rename the .accdr file to .accdb, and then invoke Access via Shell() -- or ShellWait() --  with the /runtime command-line switch to open it.  Then, after the new instance of Access closes, rename the file back to the original extension.  Crazy, yes?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-09-05T19:20:23+00:00

    Hi All

    1-if any way with other method like : use of Shell command , will be good

    2-boblarson'answer worked correctly for opening accdr file but without password protected

    that was :

    Dim strPath As String

    strPath = "YourPathToTheDatabaseIncludingFileNameAndExtensionHere"

    Application.FollowHyperlink strPath

    is there any way to add a command to support database password protected accdr file?

    regard

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-09-05T19:10:40+00:00

    You never answered my question:  Are you trying to open the database in a second instance of the Access application, or are you just trying to read data from it?

     

    If you want to open it in a second instance of Access, you could do something like this:

     

        Dim oAccess As Access.Application

     

        Set oAccess = New Access.Application

     

        oAccess.OpenCurrentDatabase "YourPath\To\OtherDatabase.accdr", False, "ThePassword"

     

        oAccess.Visible = True

        oAccess.UserControl = True

     

        Set oAccess = Nothing

     

    That is untested code, but something like it might work.

    Hi dear

    1- I built a accdb file and another protected accdr file with database password

    I want to have a button on a form in the accdb file when I press it ,it open that accdr file (No only read from it )

    2- OpenCurrentDatabase method can't open accdr file format.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-09-04T22:57:57+00:00

    You never answered my question:  Are you trying to open the database in a second instance of the Access application, or are you just trying to read data from it?

    If you want to open it in a second instance of Access, you could do something like this:

        Dim oAccess As Access.Application

        Set oAccess = New Access.Application

        oAccess.OpenCurrentDatabase "YourPath\To\OtherDatabase.accdr", False, "ThePassword"

        oAccess.Visible = True

        oAccess.UserControl = True

        Set oAccess = Nothing

    That is untested code, but something like it might work.

    Was this answer helpful?

    0 comments No comments