Solved

VB and Access

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 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…

756 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