I
iamrdbrown
I have the following code for trying to compare the contents of 2 different
fields on a form. My problem is that I get the error message & focus gets
set back to the 1st box regardless of if the contents match or not. Can
someone help me see what I am overlooking?
Private Sub txtRatingLabel_AfterUpdate()
Dim iAnswer As Integer
If txtCartonLabel <> ([txtRatingLabel] & "*") Then
iAnswer = MsgBox("Carton label scanned doesn't match Rating Label
scanned. Please try it again.", , "Label Scan Comparison")
txtRatingLabel.Value = ""
txtCartonLabel.Value = ""
txtCartonLabel.SetFocus
Else
ckbOnHold.SetFocus
End If
fields on a form. My problem is that I get the error message & focus gets
set back to the 1st box regardless of if the contents match or not. Can
someone help me see what I am overlooking?
Private Sub txtRatingLabel_AfterUpdate()
Dim iAnswer As Integer
If txtCartonLabel <> ([txtRatingLabel] & "*") Then
iAnswer = MsgBox("Carton label scanned doesn't match Rating Label
scanned. Please try it again.", , "Label Scan Comparison")
txtRatingLabel.Value = ""
txtCartonLabel.Value = ""
txtCartonLabel.SetFocus
Else
ckbOnHold.SetFocus
End If