Hi
Can anyone tell me why I may be getting a runtime error when executing this code (the code in red is what's causing the error apparently):
I have the below similar code which works perfectly on another control:
Can anyone tell me why I may be getting a runtime error when executing this code (the code in red is what's causing the error apparently):
Code:
Private Sub Pwdtxt0_BeforeUpdate(Cancel As Integer)
If Len(Pwdtxt0) < 8 Then
MsgBox "Please check your password and try again. Passwords must be more than 8 characters!"
[COLOR="Red"] Me.Pwdtxt0 = Null
Me.Pwdtxt = Null
Me.Pwdtxt0.SetFocus[/COLOR]
End If
End Sub
I have the below similar code which works perfectly on another control:
Code:
Private Sub Pwdtxt_AfterUpdate()
If Me.Pwdtxt.Value <> Me.Pwdtxt0.Value Then
MsgBox "Passwords Don't Match", vbOKOnly
DoCmd.RunCommand acCmdUndo
Me.Pwdtxt0 = Null
Me.Pwdtxt = Null
Me.Pwdtxt0.SetFocus
Else