ecannelora
Programmer
I want to put a password on my database, but when I try to open it from VBA, I don't know the proper syntax for the password argument:
Dim wsp As Workspace
Dim dbs As Database, dbsOther As Database
Set dbs = CurrentDb
Set wsp = DBEngine.Workspaces(0)
Set dbsOther = wsp.OpenDatabase("z:\pdb\PDB_be2.mdb")
I've tried varaiations of this:
Set dbsOther = wsp.OpenDatabase("z:\pdb\PDB_be2.mdb,password: "myPassword")
but I can't get anything to work. Can you help?
Dim wsp As Workspace
Dim dbs As Database, dbsOther As Database
Set dbs = CurrentDb
Set wsp = DBEngine.Workspaces(0)
Set dbsOther = wsp.OpenDatabase("z:\pdb\PDB_be2.mdb")
I've tried varaiations of this:
Set dbsOther = wsp.OpenDatabase("z:\pdb\PDB_be2.mdb,password: "myPassword")
but I can't get anything to work. Can you help?