Hi All
I am creating a database and I want to prevent duplicate records on data entry. I want it based on Firstname, Surname, E-mail address and Department.
I have put the following code in the calculated field in an expression but it doesn't like it.
=IIf(DCount("*","[ALL STAFF]","[FORENAME]<>" & Nz([FORENAME],0) & "[SURNAME]<>" & Nz([SURNAME],0) & " And [DEPARTMENT]<>" & Nz & "[DEPARTMENT],0) &" And [E-MAIL] = '" & Replace(Nz([E-MAIL]),"'","''") & "'")>0,"RECORD ALREADY EXIST","")
Can you help please?
I am creating a database and I want to prevent duplicate records on data entry. I want it based on Firstname, Surname, E-mail address and Department.
I have put the following code in the calculated field in an expression but it doesn't like it.
=IIf(DCount("*","[ALL STAFF]","[FORENAME]<>" & Nz([FORENAME],0) & "[SURNAME]<>" & Nz([SURNAME],0) & " And [DEPARTMENT]<>" & Nz & "[DEPARTMENT],0) &" And [E-MAIL] = '" & Replace(Nz([E-MAIL]),"'","''") & "'")>0,"RECORD ALREADY EXIST","")
Can you help please?