Duplicate client records

Just1

Registered User.
Local time
Today, 06:11
Joined
Jan 9, 2005
Messages
50
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
 
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.
 

Users who are viewing this thread

Back
Top Bottom