mloucel
Member
- Local time
- Today, 15:24
- Joined
- Aug 5, 2020
- Messages
- 356
Hello ALL,
I have a routine that allows my users [admins] to be able to see the password of another user to change/update, and I use a check box control, works super good, but I want to make it a bit better using MouseDOWN and MouseUP but my brain doesn't figure out how to do it.
Here is my actual code:
I am willing to change the check box for whatever else, any Ideas will be appreciated.
I already tried simply using this instead but is a little disaster it doesn't work since the check keeps either checked or unchecked and me frustrated.
thanks..
I have a routine that allows my users [admins] to be able to see the password of another user to change/update, and I use a check box control, works super good, but I want to make it a bit better using MouseDOWN and MouseUP but my brain doesn't figure out how to do it.
Here is my actual code:
Code:
Private Sub ShowPassw_Click()
If ShowPassw Then
If LoginID.Value = 1 And TempVars("SA").Value <> "True" Then
Password.InputMask = "Password"
ShowPassw.Value = False
If Form.Dirty Then
DoCmd.RunCommand acCmdUndo
End If
MsgBox "This user cannot be updated for security..", vbCritical + vbOKOnly, "User Locked"
Me!btnClose.SetFocus
Exit Sub
End If
ShowPassw.Value = True
Password.InputMask = ""
Else
ShowPassw.Value = False
Password.InputMask = "Password"
End If
End Sub
I am willing to change the check box for whatever else, any Ideas will be appreciated.
I already tried simply using this instead but is a little disaster it doesn't work since the check keeps either checked or unchecked and me frustrated.
thanks..
Code:
Private Sub ShowPassw_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If ShowPassw Then
If LoginID.Value = 1 And TempVars("SA").Value <> "True" Then
Password.InputMask = "Password"
ShowPassw.Value = False
If Form.Dirty Then
DoCmd.RunCommand acCmdUndo
End If
MsgBox "This user cannot be updated for security..", vbCritical + vbOKOnly, "User Locked"
Me!btnClose.SetFocus
Exit Sub
End If
ShowPassw.Value = True
Password.InputMask = ""
End If
End Sub
Private Sub ShowPassw_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
ShowPassw.Value = False
Password.InputMask = "Password"
End Sub