i have now a working database program in vb and a database using microsoft access. I want to set a password in Microsoft Access so that all users cannot view the database except thru the vb program as their medium.
Before placing a password in Microsoft acess:
When there is no password on my access database it is working 100% successfully.
After placing a password in Microsoft acess:
But when i placed a password on my db, and when i am running the program and click the button that will open the database it says Not a valid password making the program crash(You can see on the attached).
My security access on database access is let say for example: "mark25"
All i want is for the VB program to pass "mark25" automatically so that it can get in.
Here is my code on my module.
Public Sub open_conn()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & (App.Path & "\mdbInventory.mdb") & ";Persist Security Info=True"
i just want the database access to block the user when the user opens it without using the program.
But when the user uses the program it's ok so that the records are safe for deletion.
this is like access rights thing.
Please help to hardcode "mark25" in my vb prog!
thanks and regards!
This post has been edited by mark25: 28 April 2008 - 11:13 AM