ms access password

  • Thread starter Thread starter Guest
  • Start date Start date
Sure--there are a number of possibilities. For example, you could disable the visibility of all the form objects by default. Then capture user input by using an inputbox and perform a comparison against a hard coded password variable using the form's OnOpen event. if the user enters the correct password, the script can change the form objects and enable their visibility. Here's a possibility:

Dim vPassword As String
Dim vInput As String

vPassword = 123ABC
vInput = Inputbox("Enter Password: ")

If vPassword = vInput Then
Me.tboTextA.Visible = True
Me.tboTestB.Visible = True
'ADD MORE HERE
Else
MsgBox "Password Incorrect"
DoCmd.Close 'CLOSES FORM
End If

So to answer your question, yes--it is possible.

Best regards,

Todd
Is there anyway of password protecting just one form in a database???
 
Back
Top