Hi,
I am trying to open an Access97 database, but
keep getting the Error: Not a valid password
even though the password is correct.
Set dbsCustomers = OpenDatabase(“c:\Customers.mdb”, False, False, ";pwd=thepassword123")
Any suggestions?
Thanks
Printable View
Hi,
I am trying to open an Access97 database, but
keep getting the Error: Not a valid password
even though the password is correct.
Set dbsCustomers = OpenDatabase(“c:\Customers.mdb”, False, False, ";pwd=thepassword123")
Any suggestions?
Thanks
marhaba VBOnliner...
I had the same problem and I could not find the answer.
I posted alot of messages about but still failed to have a solution.
At last when I despair of that I shoosed to use the Microsoft ADO Data Control 6.0.
You need to provide a reference to
Microsoft DAO 3.51 Object Library
Use this code:
Code:Dim db As Database
Dim rs As Recordset
Set db = DAO.OpenDatabase(App.Path & "\Data.mdb", False, False, ";Pwd=password")
Set rs = db.OpenRecordset("SELECT * FROM table ORDER BY field")
db.close
No sure if this works.
rem Remember to choose Microsoft DAO compatibility library rem in the Project>Reference menu.
Dim dbscustomers As Database
Private Sub Command1_Click()
Set dbscustomers = OpenDatabase("c:\windows\desktop\expenses1.mdb", False, False, pwd ="thepassword123")
End sub