Link to home
Start Free TrialLog in
Avatar of Fritz Paul
Fritz PaulFlag for South Africa

asked on

Prevent duplicate Name&Surname combination in form

I have a a form like below with data source tblPatients.

I want to be warned of duplication when I add a new Surname & FirstNames combination.

When I enter a FirstNames, before update, I want the form to test whether an equal Surname & FirstNames already exists in tblPatients.

Will you please help me with the VBA.

User generated image
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
But of course there is no reason a all why the database can NOT have two patients with the same name.  There could easily be ten John Smiths in a patient records system.
Avatar of Fritz Paul


Thanks Rey. Spot on.