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
    2014-01-28T00:34:04+00:00

    thanks a lot

    1-sometimes we use like this  : Dim  UBound  only (without as ..... )

    what's the meaning of it ?  so UBound  is defined text or integer or ....? for which variable do we use like that? ( can we use of it for text or number or other variable type ? by other means , can we use of it instead of i as integer when i is a number ?

    2- even I don't define some variable like i as integer or other , access full will run my program correctly, is there any problem or 100% necessary to modify codes in this situation ? or not require to modify the codes? if you tell me yes it's neccessory to modify even it works correctly , please explain the reason .

    3-is necessary OLE Automation to check even I don't use of any OLE Object ? why? what's that?

    regard

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-01-27T23:32:59+00:00
    1. You don't need to check that, it should change automatically, by itself, when opening in the different versions.  There is no need for you to select it.  You should not be selecting anything there.
    2. My MISTAKE, that should have been Option Compare Database.  So it should be...

    Option Compare Database

    Option Explicit

    For an explanation...

    Option Compare Database tells your code how to compare strings, numbers, etc.  Option Explicit tells your code that each variable needs to be defined for it to be used.  This is very important... make sure they're at the top of each module (commented code (in green, something like:  'commented code) can go before these, or empty spaces, but nothing else.

    1. If you are getting errors using Option Explixit it means you have undeclared variables.  Using your example...

    For i=o to Ubound( AAA)...

    You need to declare i and maybe o, if that is the letter o and not a number (zero)., ie:

    Dim i As Long  'If numeric

    OR

    Dim i As Integer

    OR

    Dim i As String  'If text

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-01-27T22:14:48+00:00

    1-because I  design my program by access2010

    but I change it to Microsoft office 15 Object library and I run it by access 2013 and take the same error.

    2- when I put the Option Declare Database on the top of each module,Ms-access do highlighted with red color and doesn't permission to use of it !

    please explain what's the code ? what do they do ?

    3-when I use of  I take some error that I can't solve that , for example : For i=o to Ubound( AAA) where I used for Array function.

    regard

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-01-27T20:43:23+00:00

    Why is Microsoft Office 14 Object Library checked?  That should only be checked for Access 2010.  And I have to wonder why OLE Automation is not checked.  Have you compiled your database?  Have you put...

    Option Declare Database

    Option Explicit

    ...at the top of every Module, Form or otherwise?  I'm thinking you better *clean up* your database and then test.

    Note, I have no issues running a Runtime.  I did not test with the code in this thread.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-01-27T20:09:56+00:00

    1- yes .

    2- I see it and these are selected :

    visual basic for applicaation

    -Microsoft access 15 Object Library

    -Microsoft access 15 Access database engine Object Library

    -microsoft Office 14 Object Library

    but when I change it to .accdr format , even without using above code ( I run it directly by double click ) it crashes and exit my program !

    access 2013 has problem with runtime mode , you can test it by changing the format of a sample file.

    regard

    Was this answer helpful?

    0 comments No comments