Open database with password

agust

Just keep moving
Local time
Tomorrow, 05:23
Joined
Sep 5, 2006
Messages
18
With VBA, I want to open database with password. How should I do that? I tried the following lines and the response is "Not a valid password"

Dim theDb As Database

DbFile = CurrentProject.Path & "\MyDatabase.mdb"
Set theDb = OpenDatabase(DbFile)
 

Users who are viewing this thread

Back
Top Bottom