I have an Access form where the user will enter 20 serial numbers in text fields using a bar code reader. How can I check the form to make sure the same serial number hasn't been scanned more than once before the data is saved. Thanks in advance.
Here is the code i've tried so far.
Erica
Here is the code i've tried so far.
Code:
Dim Ctrl As Control
For Each Ctrl In Me.Controls
If Ctrl.Tag = "dcheck" Then
If Ctrl.Name <> ActiveControl.Name And _
Ctrl.Text = ActiveControl.Text Then
MsgBox ActiveControl.Text & " is a duplicate of Box " & Ctrl.Name
Dups = True
End If
End If
Next Ctrl
Comment