I'm trying to d a Dcount on 6 fields on a form. My problem is that The same value can be entered twice but not 3 times. Some times the 6 fields will always be different and sometimes some of them maybe the same but never no more than 2 can be entered. Trying to prevent users from entering bad data.
I thought something like this but don't know how to check all 6.
Dim counter As Long
counter = DCount("*", "duplicates", "Field1= [Forms]![frmParts]")
If counter >3 Then
MsgBox "There is a bad record ", vbExclamation, " Possible Duplication Error"
End If
End Sub
Field1
Field2
Field3
Field4
Field5
Field6
I thought something like this but don't know how to check all 6.
Dim counter As Long
counter = DCount("*", "duplicates", "Field1= [Forms]![frmParts]")
If counter >3 Then
MsgBox "There is a bad record ", vbExclamation, " Possible Duplication Error"
End If
End Sub
Field1
Field2
Field3
Field4
Field5
Field6