Solved

Opening a password-secured MS-Access Database

Posted on 1998-08-04
3
164 Views
Last Modified: 2010-05-03
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
Comment
Question by:Shak
  • 2
3 Comments
 

Author Comment

by:Shak
ID: 1467765
Edited text of question
0
 
LVL 1

Accepted Solution

by:
DQ earned 50 total points
ID: 1467766
OpenDatabase(App.Path & "\my.mdb",False,False,";Pwd=" & pwd)
0
 

Author Comment

by:Shak
ID: 1467767
Thanks a LOT!
Real simple isn't it?
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question