franksirvent
Programmer
Hi there
I read sometime ago that you can set the password on a backend from the front end using code like this:
Private sub Set_password()
Dim dbProtected As Database
Set wrk = DBEngine.Workspaces(0)
Set dbProtected = wrk.opendatabase("c:\mydb\db1.mdb", False, False, ";PWD=XXX")
End Sub
(sorry, but I can't give the credit to the person who posted it as I can't find it !)
I've now found the chance to use it as I need some security on my back end (which is protected with a general password XXX)
The code above runs when it opens the Main Menu form, however it does't seem to work...When I try to do any searches, etc the 'database need password' message comes up.
I have double checked and the password match correctly...also the VB code seems to work correctly, no errors given...
Any ideas ???
I read sometime ago that you can set the password on a backend from the front end using code like this:
Private sub Set_password()
Dim dbProtected As Database
Set wrk = DBEngine.Workspaces(0)
Set dbProtected = wrk.opendatabase("c:\mydb\db1.mdb", False, False, ";PWD=XXX")
End Sub
(sorry, but I can't give the credit to the person who posted it as I can't find it !)
I've now found the chance to use it as I need some security on my back end (which is protected with a general password XXX)
The code above runs when it opens the Main Menu form, however it does't seem to work...When I try to do any searches, etc the 'database need password' message comes up.
I have double checked and the password match correctly...also the VB code seems to work correctly, no errors given...
Any ideas ???