-
I am want to open a password protected MS Access database with DAO from my program. But I want to open the databse with the password entered in a text box. I am using the following statement :
Set DB = OpenDatabase(App.Path & "\Data.mdb", False, False, ";pwd=Text1.Text")
But this does not work out and the "Invalid Password" error is displayed.
Can someone tell me how to open a database by entering its password in the textbox and sending the textbox value to the database?
Please help me out.
Thanks in advance.
:p Kinjal :p
-
Since you Text1.Text is an variable so you need to put in in this way.
Code:
Set DB = OpenDatabase(App.Path & "\Data.mdb", False, False, ";pwd=" & Text1.Text & ")"
-
Thanks a lot Chris and Mikef :D
This is very simple thing.
Thanks once again.
:p kinjal :p