S
skchth
Using the vbscript:
dim o
set o=createobject ("Access.Application")
o.automationsecurity=1 ' set macro security LOW.
o.opencurrentdatabase "C:\Database\db1.mdb"
o.visible=true
o.usercontrol=true
set o=nothing
given by TC returns the error message that the database can not be found or
doesn't exist. However, when I set the security level in my database to low,
I am able to open the database using the vbscript.
I also tried
Const cDatabaseToOpen = "C:\Database\db1.mdb"
On Error Resume Next
Dim AcApp
Set AcApp = CreateObject("Access.Application")
If Val (AcApp.Version) >= 11 Then
AcApp.AutomationSecurity = msautomationsecuritylow
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
which returns the error message that the database failed to open. What am I
doing wrong?
Thanks for all the help
dim o
set o=createobject ("Access.Application")
o.automationsecurity=1 ' set macro security LOW.
o.opencurrentdatabase "C:\Database\db1.mdb"
o.visible=true
o.usercontrol=true
set o=nothing
given by TC returns the error message that the database can not be found or
doesn't exist. However, when I set the security level in my database to low,
I am able to open the database using the vbscript.
I also tried
Const cDatabaseToOpen = "C:\Database\db1.mdb"
On Error Resume Next
Dim AcApp
Set AcApp = CreateObject("Access.Application")
If Val (AcApp.Version) >= 11 Then
AcApp.AutomationSecurity = msautomationsecuritylow
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
which returns the error message that the database failed to open. What am I
doing wrong?
Thanks for all the help