data control ACCESS passwords

Posted on 1999-01-04
Last Modified: 2010-05-03
Is there a way to enter an ACCESS database password in a data control object on a VB form?  If so, how do I do it? It seems like there should be a simple way to put it in the properties someplace but I can't find it. I'm using ACCESS 97 and VB 5.0.   --BOB
Question by:rafox
  • 2
  • 2

Accepted Solution

MikeP090797 earned 200 total points
ID: 1453835
Use the Connect property ";pwd=pass"

Author Comment

ID: 1453836
Connect gives me a selection of database type.  Access is already selected.  Do I add your solution to Access to give me 'Access;pwd=password' or is there something I'm missing?  When I do this, I get an error 3170 saying 'couldn't find installable ISAM'. The ;pwd=password has always worked well for me with the Set db=OpenDataBase.....("databasename",False,False,";pwd=password").


Expert Comment

ID: 1453837
For Access database you can ommit the type, just use ";pwd=pass"

Author Comment

ID: 1453838
Thanks, MikeP.  It worked and saved me a lot of re-programming.


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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…

910 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

20 Experts available now in Live!

Get 1:1 Help Now