nuttychick
Registered User.
- Local time
- Today, 13:26
- Joined
- Jan 16, 2004
- Messages
- 84
I am trying to password protect a form (SASMenu), but have come across what seems a common problem.The text the user types is displayed instead of having an input mask of ********
I have looked but have found no way on formating the inputbox.
From a thread I found I have created a new form, with a text box (password) and a cmd button to load the form(SASMenu)the code of the command button is below.
However when trying run this I get an error: Object doesn't support this property or method.
Where am I going wrong?
I did take the time to write the module and table for the password (code taken from the MS site) I would prefer to use that method if possible, but how do I do this without an input box so that the password is not shown?
Any help would be much appreciated
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Dim stDocName As String
Dim stLinkCriteria As String
If [Password] = "Password" Then
stDocName = "Screen4 - SAS Main Menu"
DoCmd.OpenForm stDocName
DoCmd.Close acForm, "AccessScreen"
Else
MsgBox "The password you have entered in incorrect"
DoCmd.Close acForm, "AccessScreen"
End If
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub
I have looked but have found no way on formating the inputbox.
From a thread I found I have created a new form, with a text box (password) and a cmd button to load the form(SASMenu)the code of the command button is below.
However when trying run this I get an error: Object doesn't support this property or method.
Where am I going wrong?
I did take the time to write the module and table for the password (code taken from the MS site) I would prefer to use that method if possible, but how do I do this without an input box so that the password is not shown?
Any help would be much appreciated
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Dim stDocName As String
Dim stLinkCriteria As String
If [Password] = "Password" Then
stDocName = "Screen4 - SAS Main Menu"
DoCmd.OpenForm stDocName
DoCmd.Close acForm, "AccessScreen"
Else
MsgBox "The password you have entered in incorrect"
DoCmd.Close acForm, "AccessScreen"
End If
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub