A
Angel G
What is the best approach for preventing moving to a different control?
CurrentPIN is the control that I do not want to leave if the data entered is
incorrect.
I have used CurrentPIN.SetFocus and docmd.gotocontol "CurrentPIN". And the
cursor goes to the password control when the incorrect PIN has been used.
What am I missing?
Here is my code:
Private Sub CurrentPIN_AfterUpdate()
If CurrentPIN <> UserPIN Then
MsgBox "Incorrect Pin number used. Please Try again", vbCritical, "Invalid
PIN number"
NewPIN1.Enabled = False
NewPin.Enabled = False
CurrentPIN = ""
CurrentPIN.SetFocus
Else
NewPIN1.Enabled = True
NewPin.Enabled = True
End If
End Sub
Any input is appreciated
Thanks!
CurrentPIN is the control that I do not want to leave if the data entered is
incorrect.
I have used CurrentPIN.SetFocus and docmd.gotocontol "CurrentPIN". And the
cursor goes to the password control when the incorrect PIN has been used.
What am I missing?
Here is my code:
Private Sub CurrentPIN_AfterUpdate()
If CurrentPIN <> UserPIN Then
MsgBox "Incorrect Pin number used. Please Try again", vbCritical, "Invalid
PIN number"
NewPIN1.Enabled = False
NewPin.Enabled = False
CurrentPIN = ""
CurrentPIN.SetFocus
Else
NewPIN1.Enabled = True
NewPin.Enabled = True
End If
End Sub
Any input is appreciated
Thanks!