Solved

VB and Access

Posted on 1998-08-10
2
148 Views
Last Modified: 2010-04-30
I have an Access Database named: C:\TEST.MDB

I have set the password in Access 97 as: ABC

When I open the file TEST.MDB in Access it asks for the password after entering ABC I can access the information..
I want to open the Database file using a Visual Basic 5 Prof. Program, when I try opening the Database file VB always tells me I have used an incorrect PASSWORD!!!  

How do I open the Database File with the password???

0
Comment
Question by:jonder
2 Comments
 
LVL 1

Author Comment

by:jonder
ID: 1468439
Edited text of question
0
 
LVL 9

Accepted Solution

by:
Dalin earned 100 total points
ID: 1468440
IF you are using a data control:
With Data1
DatabaseName=App.Path & "\my.mdb"
RecordSource="mytable"
Connect=";Pwd=" & pwd
Refresh
End With

If you are using DAO:
Set YourDB = DBEngine.WorkSpaces(0).OpenDatabase(YourDBFilewithPAth,False,False,";Pwd=" & pwd)

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now