Solved

VB and Access

Posted on 1998-08-10
2
147 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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

18 Experts available now in Live!

Get 1:1 Help Now