Duplicate Entry

dynamictiger

Registered User.
Local time
Today, 21:17
Joined
Feb 3, 2002
Messages
270
I have a form which collects retail customer information, phone, name, address and so on.

I have set the phone number and address fields to not allow duplicates at table level.

However, when I type in a duplicate record no flags are coming up. The only way I know I have a duplicate is the next form goes to existing information for the client in another table.

1:How can I add a function that when the user types the phone number if there is a match it goes to that record?

2: How can I ad a function that if the address is the same or very similar it pops up say a list box showing the similar address's and if the user clicks takes them to the existing record?
 
Create a query that would show sample phone number together with the record ID Number.

Use that query to open a recordset.

if the count of the recordset is > 0 then msgbox "There is a duplicate entry See list?" else continue update.

Put the above procedure in Before Update.

IF yes, see list, show list.
If No, don't wanna see list, cancel update.


If there is a duplicate, the list would show, On double click of the record, assign the record number to a variable, open a form depending on what's the variable data.

You can open the same form as the data entry form.
 

Users who are viewing this thread

Back
Top Bottom