Database Password

  • Thread starter Thread starter Derick
  • Start date Start date
D

Derick

Hi,
I've created a Front end and Back end Database in access
2000. The backend database is password protected. Now I
cant open my database from the front end. I've tried
various examples of code but still the same problem. I
need the password to protect the data from unautherised
access. Can anyone please help?

Thanks

Derick
 
Derick,

If you cant open the database at all, and its due to the
password on the back end:
remove the password from the back end, then open the front
end database.

keep it open then apply a password to the back end again.

re-link your tables in the front end.

see if this helps

Brian
 
Type the code below into a new module


1. Open the Data.MDB in exclusive mode.
2. Unset the password using the current password.
3. Reset the password using the new password.
4. Close the Data.MDB.
5. Open the application file
7. Place the cursor anywhere in the code module then run
the following code. (Run menu).


function ChangePassword()

dim db as database
dim tdf as tabledef
set db = currentdb

For Each tdf In db.TableDefs
On Error Resume Next
tdf.Connect = "MS Access;PWD=" &
yournewpassword" ";DATABASE=C:\Path to MDB
YourDatabase.MDB"

tdf.RefreshLink
Next tdf

end function
 
Sent the last post but forgot to put my name
-----Original Message-----
Derick,

If you cant open the database at all, and its due to the
password on the back end:
remove the password from the back end, then open the front
end database.

keep it open then apply a password to the back end again.

re-link your tables in the front end.

see if this helps

Brian

.
 
I assume you linked the front end to the back end and then
put a password on the back end. You need to do the exact
opposite.
Remove the links from the front end, put the password on
the back end, reinstall the links on the front end. If
you do it this way the password is saved in the front end
database.
Nina
 
Thanks to all, I will try it.

Derick
-----Original Message-----
Type the code below into a new module


1. Open the Data.MDB in exclusive mode.
2. Unset the password using the current password.
3. Reset the password using the new password.
4. Close the Data.MDB.
5. Open the application file
7. Place the cursor anywhere in the code module then run
the following code. (Run menu).


function ChangePassword()

dim db as database
dim tdf as tabledef
set db = currentdb

For Each tdf In db.TableDefs
On Error Resume Next
tdf.Connect = "MS Access;PWD=" &
yournewpassword" ";DATABASE=C:\Path to MDB
YourDatabase.MDB"

tdf.RefreshLink
Next tdf

end function
.
 
Hi
I've run the code but recieve an error "ISAM not found"
What could be the problem?

Derick
 
Back
Top