View Full Version : Duplicate client records


Just1
03-21-2007, 08:55 AM
After entering a forename in one field on a form and then entering a surname in the next field, can anyone help me with some code so that I get a message up to tell me if I have someone in the database already who has that exact surname and forename?

Thanks
Justine

Summerwind
03-21-2007, 11:37 AM
Create a recordset "WHERE First = " & me.FirstnameBox.Value & " AND Surname = " & me.SurnameBox.Value

After opening the recordset:

If Not .BOF And Not .EOF will return True if there is a record which meets your criteria. Therefore show a messagebox telling you so.