I use a database connection string as below and my program work fine.
Public Function initdb()
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase(App.Path & "\Masterfile.mdb")
Set rs = db.OpenRecordset("Detail", dbOpenTable)
max = rs.RecordCount
Exit Function
End Function
***********************************
But now I lock the msaccess table ie. Masterfile.mdb with password in order to prevent anyone opening the table and change data inside not through the program, how do I change the connection string so that my code would still work with the protected database.
Any help or suggestion would be highly appreciated.
Zela