I already have a primary key (member id) on table MembersList, but want to test for duplicates on a form where both first and last names are combo boxes before creating the record. so far I have the following as an Event procedure on the Before Update of the second combo box names Last Combo. The Last Combo saves to [Member Last], and First Combo saves to [Member First]. I want to show a message if the First name, Last name, and CenterID duplicate one already in the table MembersList. I also want to not save the record if there is a duplicate.
Private Sub Last_Combo_BeforeUpdate()
Where [Member First] = [MembersList].[Member First] And [Member Last] = [MembersList].[Member Last] And [CenterID] = [MembersList].[CenterID]
Private Sub Last_Combo_BeforeUpdate()
Where [Member First] = [MembersList].[Member First] And [Member Last] = [MembersList].[Member Last] And [CenterID] = [MembersList].[CenterID]