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-02-02T15:42:43+00:00

    I'm going to suggest you read about declaring variables and Dim statements.  Here are a few links to get you started...

    Declaring Variables

    http://msdn.microsoft.com/en-us/library/office/gg264241.aspx

    Declaring Variable by Chip Pearson

    http://msdn.microsoft.com/en-us/library/7ee5a7s1.aspx

    Dim Statement (Visual Basic)

    http://msdn.microsoft.com/en-us/library/7ee5a7s1.aspx

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-02-01T23:28:59+00:00

    thanks a lot

    I understand that I can use of the variable for All of types

    but I have a question :

    I sew sometimes someone use of Dim XX  instead of Dim XX as string ( or ... )

    when we leave the "as .... " then wich type does access determine XX ?

    regard

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-02-01T22:16:57+00:00
    1. Yes, you can use Integer, String, Boolean, etc...
    2. Try...

    Me.cmdSaveToFile

    Me.cmdOpenFile

    ...as I'm assuming those are Command Buttons.  But I'm nit sure as I don't know what...

    Me.attachFile

    is.  If you decide to use Option Explicit I'm sure you're going to have quite a bit to fix/adjust.  It's your code you're going to have to fetermine the correct variable.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-01-30T20:16:36+00:00

    I have a question about explicit that was at above

    1- can I use of varient for every parameters like string , integer ,etc ?

    2- some of my codes are :

    ...........

     With Me.attachFile

            cmdSaveToFile.Enabled = CBool(.AttachmentCount)

            cmdOpenFile.Enabled = cmdSaveToFile.Enabled

       ........

    when I use of explicit and compile it , it give me an error for undefinding type of cmdSaveToFile and cmdOpenFile .

    which type should I use for that ? can I define for it "variant" ? what's the best ?

    regard

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-01-28T02:01:04+00:00
    1. Read this to understand declaring variables...

    http://office.microsoft.com/en-us/access-help/HV080755458.aspx

    1. Sure your program will run correctly if the variables are not properly declared.  BUT, it makes debugging errors a nightmare.  So, if not following a standard practice is okay with you then don't bother. 

    And, in thinking about it...  If your code doesn't compile then converting to a Runtime can cause it to run with errors.    Now, it will Compile without variables being declared but one has to wonder if that's a false positive because you have omitted the statement that would check for errors in your code.  To put it simply, you converted your database to a Runtime, it is giving you problem... how do you really know the source of the problems because you omitted the statement that would check.  Up to you, so do as you please...

    1. OLE Automation - you can leave it unchecked.  There has been debate about how useful it is, I can't find the thread where that conversation took place.  However, it is set by default and doesn't really do any harm to leave it that way.  I'd rather leave the default to be sure any errors showing up aren't related to that.

    Was this answer helpful?

    0 comments No comments