Forum Discussion

Mark_R1997's avatar
Mark_R1997
Copper Contributor
Mar 26, 2022

Access error 3051

I opened my Access file and am getting 3051 error when an autoload form trys to run VBA OnLoad.

And if I try to open a table, tells me 'I can't read or write to the file because it is opened exlcusively by another user or I need permissions.

I am the only user and this is a stand alone file.

  • Mark_R1997 Ouch. OneDrive? It's bad juju to try to run any Access relational database application from OneDrive. The problem you ran into is one of a couple of different problems that can arise.

     

    Congratulations on solving the problem.

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor

    Mark_R1997 

    When you refer to "... autoload form...", do you mean the Display Form form designated in Options as the first form to open?

    What is the actual code that runs on the On Load event? Showing us the details is a good way to share information that can be useful in helping identify a problem.

     

    Also, when you try to open a table, is that table also bound to a form that is open at the time? Or does it happen even when only that table is open and nothing else? Again, details go a long way towards helping trouble-shoot potential reasons for things that happen.

    • Mark_R1997's avatar
      Mark_R1997
      Copper Contributor

      George_Hepworth 

      Thanks but it was a OneDrive issue. As soon as I moved the file onto my hard drive, it worked fine.

      Not sure why OneDrive permissions went wonky yet....

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor

        Mark_R1997 Ouch. OneDrive? It's bad juju to try to run any Access relational database application from OneDrive. The problem you ran into is one of a couple of different problems that can arise.

         

        Congratulations on solving the problem.