A
ADB_Seeker
Using a command button on a form, I want to open a new instance of Access and
then open a secured DB. I used code from The Access Web
(http://www.mvps.org/access/modules/mdl0036.htm) and am having trouble
personalizing it. When I click on the command button, I get a run-time error
4265. Following is my code:
Private Sub lblECSMgmtDB_Click()
Dim strDB As String
Dim strCmd As String
Dim objSecuredDB As Access.Application
strDB = "[\\Helialabama\engsys$\DataBases\ECS MNGT1.0.mdb]"
strCmd = SysCmd(acSysCmdAccessDir) & "[C:\Program Files\Microsoft
Office\Office10\MSACCESS.EXE] " _
& strDB & " /wrkgrp " & [Secured Management.mdw] _
& " /user Admin" "/pwd ''"
Call Shell(strCmd, vbNormalFocus)
DoEvents: DoEvents: DoEvents
Set objSecuredDB = GetObject(strDB)
Stop
End Sub
Thanks in advance for all help.
Linda
then open a secured DB. I used code from The Access Web
(http://www.mvps.org/access/modules/mdl0036.htm) and am having trouble
personalizing it. When I click on the command button, I get a run-time error
4265. Following is my code:
Private Sub lblECSMgmtDB_Click()
Dim strDB As String
Dim strCmd As String
Dim objSecuredDB As Access.Application
strDB = "[\\Helialabama\engsys$\DataBases\ECS MNGT1.0.mdb]"
strCmd = SysCmd(acSysCmdAccessDir) & "[C:\Program Files\Microsoft
Office\Office10\MSACCESS.EXE] " _
& strDB & " /wrkgrp " & [Secured Management.mdw] _
& " /user Admin" "/pwd ''"
Call Shell(strCmd, vbNormalFocus)
DoEvents: DoEvents: DoEvents
Set objSecuredDB = GetObject(strDB)
Stop
End Sub
Thanks in advance for all help.
Linda