Results 1 to 6 of 6
  1. #1
    bbxrider is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2010
    Posts
    69

    autoexec macro error 2001

    I have the autoexec macro setup to run a function.
    the function is executed and runs ok when I manually execute autoexec,
    watching the entire execution in the debugger.

    the db is stored on a share point site. if I download a " fresh" copy and open access
    the first time after the download, I get the 2001 error, see attachment.
    after clicking the "stop macros" button the db finishes its open and operates normally
    however, if the db is closed and reopened a 2nd


    and subsequent times, it opens and there is no error 2001.

    I put a quick msgbox in the function to check its execution, at startup when I don't have
    the debugger available. if its the first run with the 2001 error I don't get the msgbox, I assume
    that means the function was never called from the autoexec.
    When opening db subsequent to first run after download, I get the msgbox.

    I have checked quite a few posts and not finding a solution, any ideas here?
    Attached Thumbnails Attached Thumbnails error.2001.autoexec.PNG  

  2. #2
    bbxrider is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2010
    Posts
    69
    ok found it, evidently this autoexec error is due to the db not being a 'trusted' document
    and because it runs at startup before you are prompted to make it trusted, it throws the error
    because to run a macro it needs to be a trusted document
    I was able to make it trusted in the db options in the trust center/trust center settings

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    Suggest in access set a specific folder to be trusted, then download your fresh copy there

  4. #4
    bbxrider is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2010
    Posts
    69
    thanks for the suggestion, if there is the trusted folder, can I put access db's in it that will be trusted by an inheritance and therefore not have to specifically trust each one?

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    yes - that is the way it works

  6. #6
    bbxrider is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2010
    Posts
    69
    ok thats easy, thanks again

Please reply to this thread with any new information or opinions.

Similar Threads

  1. docmd.OpenQuery produces error 2001
    By ultimateguy in forum Programming
    Replies: 4
    Last Post: 08-09-2014, 10:16 PM
  2. Replies: 1
    Last Post: 05-11-2012, 10:59 AM
  3. Replies: 0
    Last Post: 06-17-2010, 04:51 AM
  4. Using parameter in autoexec macro
    By lchurch in forum Queries
    Replies: 0
    Last Post: 03-04-2009, 06:22 PM
  5. Run-time error 2001
    By RONY in forum Programming
    Replies: 0
    Last Post: 12-23-2008, 06:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums