Hello

I have a form where the user will scan 2 tubes together to see if they have the same barcode. If they have the same barcode a new field will be visible to the user and they can select a value from the combo BOX, but I do not get this to work.
My code works if the barcode is not equal to each other, but it does not work when barcodes are the same. I cannot get up the hidden field.
So I wonder if anyone could help me with this problem?

Sincerely
Geir Arne

The Code:

Private Sub Form_AfterUpdate()
Hemolyse.Visible = False
DoCmd.GoToRecord , "", acNewRec
Forms!frm_Hemolyse!Tube1.SetFocus
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Tube1 = Tube2 Then
Hemolyse.Visible = True
Else
MsgBox "No match between the tubes, try again"
Cancel = 1
Forms!frm_Hemolyse!Tube1.SetFocus
End If
End Sub

Private Sub Form_Current()
Hemolyse.Visible = False
DoCmd.GoToRecord , "", acNewRec
Forms!frm_Hemolyse!Tube1.SetFocus
End Sub