bob bisquick
Registered User.
- Local time
- Today, 17:59
- Joined
- Nov 8, 2002
- Messages
- 37
I am trying to open one database from inside another (the user logs in, gets a "switchboard", and can choose from one of several databases from the switchboard). Those other databases have user level security. I tried using the method from the Microsoft Security FAQ:
Dim lngReturn As Long
Dim objAccess As Access.Application
lngReturn = Shell("C:\MSACCESS.EXE " _
& "/wrkgrp c:\MyMDW.mdw /User username /Pwd password /Nostartup")
DoEvents
Set objAccess = GetObject(, "Access.Application")
objAccess.OpenCurrentDatabase "c:\MyMDB.mdb", False
objAccess.DoCmd.OpenReport "MyReport", acViewPreview
Set objAccess = Nothing
But I get the following errors:
1) The command line you used to start Microsoft Access contains an option that Access doesn't recognize.
2) It does not recognize the path to my .mdw. It scrambles it somehow.
I have tweaked the Shell path various ways and removed the OpenReport part because the databases I am trying to open have an autoexec that opens to a main menu.
Dim lngReturn As Long
Dim objAccess As Access.Application
lngReturn = Shell("C:\MSACCESS.EXE " _
& "/wrkgrp c:\MyMDW.mdw /User username /Pwd password /Nostartup")
DoEvents
Set objAccess = GetObject(, "Access.Application")
objAccess.OpenCurrentDatabase "c:\MyMDB.mdb", False
objAccess.DoCmd.OpenReport "MyReport", acViewPreview
Set objAccess = Nothing
But I get the following errors:
1) The command line you used to start Microsoft Access contains an option that Access doesn't recognize.
2) It does not recognize the path to my .mdw. It scrambles it somehow.
I have tweaked the Shell path various ways and removed the OpenReport part because the databases I am trying to open have an autoexec that opens to a main menu.