I am trying to open a Secured front-end database that uses a workgroup file using the following code. myID and myPSWD are valid in mySecured.mdw but the code errors out each time indicating that the user and password is invalid. It seems like the DBEngine.SystemDB = "C:\MyFolder\mySecured.mdw" is not working because when I mouse over this line in the debug window it is always referencing the original C:\Program Files\.......\System.mdw.
Dim rst As Recordset
Dim dbs As database
Dim wks As Workspace
Dim varLastMod As Date
DBEngine.SystemDB = "C:\MyFolder\mySecured.mdw"
Set wks = CreateWorkspace("NewWks", "myID", "myPSWD")
Set dbs = wks.OpenDatabase("C:\MyFolder\MyDatabase.mdb")
Set rst = dbs.OpenRecordset("SetupGeneral", dbOpenDynaset)
varLastMod = rst!LAST_MODIFIED
Any help will be appreciated.