Welcome to the skill header Forums. You can ask questions, get help, or help other members out. Join our Forum for free.

Unique key for Phon...
 
Notifications
Clear all

Unique key for Phone number is Priority ?

1 Posts
1 Users
0 Reactions
2 Views
Posts: 21
Topic starter
(@arseyguy)
Eminent Member
Joined: 9 months ago

Hi Ursh,

In my database, my major concern is Unique phone number no duplicate or matched with others. When i use below code it works fine in Add New record (Unbound forms) but when i use in update form( Bound form) it says Duplicate by checking that same customer records so i removed below code in update form. But if i remove the duplicate checking code then i might entered duplicate phone number in future. 

So, i wanted the code which checks the duplicate data but except that open records data. It should check the data with others customer not the opened customer.

If DCount("CustomerID", "Customer Details", "Phone=""" & Me.cPhone & """") Then
MsgBox "Phone Number Already Exist", vbCritical, "Already Exist"
End If

It should exclude checking the opened customer records and check other records weather it it is duplicate or not. Please help because this is my biggest concern not to duplicate the phone number and entered only unique phone number.s

Share: