ACCESS - set DB password (with VBA)

  • Thread starter Thread starter Guest
  • Start date Start date
Greg,

What kind of password are you looking for? If you want one that won't let
someone just open the DB and mess around with the tables, you can create a
small form and use it as the Startup form (Tools -> Startup -> Display form)

On the form's load event, use an input box that asks for a password, then
checks the password against a constant you have set in a module.

If Inputbox("Enter a password") = yourPassword Then
DoCmd.Close acForm, "Form1"
Else
Application.Quit
End If

It's a simple way to go about it and will keep the casual user from messing
with anything. There are a few ways to secure your DB that are much harder
to deal with, unfortunately I can't help you with those.

HTH,
Nick
 
1.tools->securiry->set DB password (but with vba)

2. Securing VBA code with a password (protection->lock project for viewing)
- also with vba
----------------------------------------
 
Back
Top