On Fri, 10 Jul 2009 07:44:01 -0700, Armele
<(E-Mail Removed)> wrote:
If that worked, malware could do the same thing.
-Tom.
Microsoft Access MVP
>
>I would like to know how/wher to apply the following code in my application
>in order to suppress the security warning? (see code below)
>
>
>
>
>Const cDatabaseToOpen = "path\App_name.mdb"
>
>On Error Resume Next
>Dim AcApp
>Set AcApp = CreateObject("Access.Application")
>If Val(AcApp.Version) >= 11 Then
> AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow
>End If
>AcApp.Visible = True
>AcApp.OpenCurrentDatabase cDatabaseToOpen
>If AcApp.CurrentProject.FullName <> "" Then
> AcApp.UserControl = True
>Else
> AcApp.Quit
> MsgBox "Failed to open '" & cDatabaseToOpen & "'."
>End If
>
|