I'm trying to use a script file to open my database. I found this script on the microsoft web site and it resets the security level to low and then opens the database. I need it to open the database with a runtime version. How exactly would I go about doing that? I would really appreciate any help.
Here is the script:
Thank you in advance.
![[ponytails] [ponytails] [ponytails]](/data/assets/smilies/ponytails.gif)
Here is the script:
Code:
Const cDatabaseToOpen = "C:\Program Files\TaneyPO\TaneyPOSQL2003.ade"
On Error Resume Next
Dim AcApp
Set AcApp = CreateObject("Access.Application")
If AcApp.Version >= 10 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
Thank you in advance.
![[ponytails] [ponytails] [ponytails]](/data/assets/smilies/ponytails.gif)