Restricting access to a form

  • Thread starter Thread starter Henry
  • Start date Start date
H

Henry

is there any way to password protect a Form without using
the security settings for the entire database?

Thanks
 
I gotn thisd from a previous post. This goes in the
onclick event of the button that opens the form.

Mask. Choose this from the list of all properties for the
text box control , or go to the data tab for properties
for the control. Then find "Input Mask", click on the ...
button all the way to the right, and select password. As
simple as that! Good Luck.

Private Sub Form_Open(Cancel As Integer)
Dim isgm As String

isgm = InputBox("Enter Password")
If UCase(isgm) = "PASSWORD" Then
DoCmd.OpenForm "Insert Form Name", , , , , , ""
ElseIf UCase(isgm) <> "PASSWORD" Then
MsgBox ("Incorrect Password")
DoCmd.OpenForm "Switchboard", , , , , , ""
End If
End Sub

Jim
 
Worked like a charm, thanks so much
-----Original Message-----
I gotn thisd from a previous post. This goes in the
onclick event of the button that opens the form.

Mask. Choose this from the list of all properties for the
text box control , or go to the data tab for properties
for the control. Then find "Input Mask", click on the ...
button all the way to the right, and select password. As
simple as that! Good Luck.

Private Sub Form_Open(Cancel As Integer)
Dim isgm As String

isgm = InputBox("Enter Password")
If UCase(isgm) = "PASSWORD" Then
DoCmd.OpenForm "Insert Form Name", , , , , , ""
ElseIf UCase(isgm) <> "PASSWORD" Then
MsgBox ("Incorrect Password")
DoCmd.OpenForm "Switchboard", , , , , , ""
End If
End Sub

Jim

.
 
Back
Top