Solved

VB and Access

Posted on 1998-08-10
2
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
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…

738 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