C
Chris
Hi All, I am trying to use the following code to stop duplicate entries
being entered into my table.
If DCount("*", "tblStaffEvidence", "EvidenceID=" & intEvidence & _
" And StaffID =" & intStaffID & _
" And ColTerm =" & intTerm) > 0 Then
MsgBox "This member of staff has already been assigned
this evidence," & vbCrLf & _
"Please assign to someone else .", vbInformation
end IF
The message box is appearing whenever the staffID is in the table but I only
want the message box to appear when the 3 values are found to be true. Any
Idea's?
tblStaffEvidence
StaffEvidenceID (pk) (int)
staffID (fk)
EvidenceID (fk)
ColTerm (fk)
being entered into my table.
If DCount("*", "tblStaffEvidence", "EvidenceID=" & intEvidence & _
" And StaffID =" & intStaffID & _
" And ColTerm =" & intTerm) > 0 Then
MsgBox "This member of staff has already been assigned
this evidence," & vbCrLf & _
"Please assign to someone else .", vbInformation
end IF
The message box is appearing whenever the staffID is in the table but I only
want the message box to appear when the 3 values are found to be true. Any
Idea's?
tblStaffEvidence
StaffEvidenceID (pk) (int)
staffID (fk)
EvidenceID (fk)
ColTerm (fk)