Share via

Suppressing microsoft access security prompts when transferring Access files

Anonymous
2012-10-07T15:04:07+00:00

If I export Access files using transfer database in a macro, the files transfer and I don't get prompted by Access each time it transfers a file.  If I convert the macro to Visual Basic, I get a Microsoft Access security prompt each time a file is transferred.  Why is this happening and how can I prevent the security prompts?  My macro turned off the warnings and I also have them turned off in Visual Basic, so I don't think that's the problem or answer.  Thank you.

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

9 answers

Sort by: Most helpful
  1. Anonymous
    2012-10-09T01:26:18+00:00

    Thanks!  Here it is.  Please note that it comes from a converted macro.

    Option Compare Database

    '------------------------------------------------------------

    ' Macro11

    '

    '------------------------------------------------------------

    Function Macro11()

    On Error GoTo Macro11_Err

        DoCmd.SetWarnings False

        DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\Users\Russell\Documents\TestTransferExportReceive.accdb", acTable, "tbl_01_Titles", "test_tbl_01_Titles", False

        Beep

        MsgBox "test file output", vbOKOnly, ""

        DoCmd.SetWarnings True

    Macro11_Exit:

        Exit Function

    Macro11_Err:

        MsgBox Error$

        Resume Macro11_Exit

    End Function

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-10-10T23:46:19+00:00

    It's odd because it should work the reverse... The macro should not work and the code should, especially in light of the Option that is selected.  I'm going to suggest you stick with the Macro.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-10-10T12:44:34+00:00

    Thanks.  The message is from Access.  I'll try to post a screen capture.  The message title states the following:  Microsoft Office Access Security Notice.  Body of the message:  A potential security concern has been identified......

    I understand the message and it's something you typically get when opening a database.  However, I don't understand why I don't get this message when transferring a database via a macro but it appears if the macro is converted to VB.  It's the same code...I think.  My only guess is that a macro is considered a controlled environment and VB is not, so thus the message appears. 

    As for the Macro Setting, it's set to the second choice, "Disable all macros with notification".  And it's grayed out so I can't change it.  I'm on a government system.

    Thanks again.  I hope this helps.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-10-09T04:21:15+00:00

    Well, nothing wrong there...  Look under Acces Options > Trust Cent > Macros and see what is selected there.  And just to confirm... exactly what message are you getting?  Are you sure it's from Access and not from Outlook?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2012-10-08T22:58:37+00:00

    Please copy/paste the VBA code here...  No way to tell, since you say you are turning off the warnings what may be happening...

    Was this answer helpful?

    0 comments No comments