• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

Opening a password-secured MS-Access Database

I'm trying to open a local MS-Access 97 Database, (path is same as application, but that doesn't matter anyway)
When I had not password-locked the db, all I need was
    Set DB = OpenDatabase(DbaseName)

But now that I need the database to be more secured, I put in a password, but I don't know where to put it in the function call.
I think it's supposed to be in the connection string but I've tried the following, but it doesn't work, it says "Invalid Password".
    Set DB = OpenDatabase(Dbasename, , , ,"Pwd=MyDbPassword")

Any help would be greatly appreciated.
0
Shak
Asked:
Shak
  • 2
1 Solution
 
ShakAuthor Commented:
Edited text of question
0
 
DQCommented:
OpenDatabase(App.Path & "\my.mdb",False,False,";Pwd=" & pwd)
0
 
ShakAuthor Commented:
Thanks a LOT!
Real simple isn't it?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now