Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a password protected database of Access through Data Control

Status
Not open for further replies.

ittobaba

Programmer
Mar 16, 2002
3
US
I have connected some text fields on a form in VB, through Data Control, to a database in Access (test.mdb). At run-time, it works fine.

The problem is that if I protect the "test.mdb" database in Access by a PASSWORD, and then run the program, it does not work and an error message is displayed, "Not a valid password". I do not know how to pass the password in VB's code so that the database may be opened.

It is perhaps a very primitive or beginners' question, nevertheless, I am hopeful that someone may kindly come to my rescue. Thanks

ittobaba
 
Are you using an ADO connection on the data control? Can you paste in the connection code and the connection string? Is the connection done from VBA code or is it established some other way. I don't no about VB, but in Access the connection for a project is established at the application level.
 
Dear cmmrfrds
Thank you for the responce.

I do not know about the ADO connection. What I do is quite simple. I open VB (Enterprize Edition) and 'Enter' on the 'StandardExe' form. As soon as the form is displayed, I double-click on the 'Data Control' icon in the toolbox, and it is immediately placed on the form. Similarly I keep placing, by a double click, the other control on the form as well. After this, all I do is to set the above mentioned TWO properties (from the properties' window) of the 'Data Control' and the other controls.
That's all

Doctor
 
There are a number of Visual Basic Forums in tek-tips. It is probably better to put your question in one of the VB Forums.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top