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: Most helpful
  1. 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
  2. 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
  3. Anonymous
    2013-09-04T22:52:33+00:00

    Not really sure what you're asking for, so hopefully this will help...

    http://www.access-diva.com/f10.html

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-09-04T22:33:31+00:00

    Since there is no *security* in an Access 2010 databases you must have put your own, stored in some table.  I don't have any VBA for that.  Below is code the used to work on Access 2003 and down.  You might be able to modify that...

     

    http://www.access-programmers.co.uk/forums/showthread.php?t=178072

    Hi dear

    can you give me a way with stored password in some table for the purpose ?

    regard

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-09-04T21:54:16+00:00

    Hi dear

    Thanks for your reply

    ok , it's work correctly but a message appears with this message :

    " some files can  contain viruses or otherwise be harmful ...

    .......... would you like to open this file? "

    I have 2 question now :

    1-how can omit that message?

    2-How can open accdr file that I want to open with this code , when it has a database password ?

    Note: I don't want to use of sendkeys command for this purpose

    regard

    Was this answer helpful?

    0 comments No comments