View Full Version : how do i run a query to find duplicates??


bandr0
06-06-2007, 04:14 AM
hi all,

im trying to make a query so that when someone updates a field in a form it searches a table (Companytable) which is a list of company names. If it exists i want it to then display a msgbox " already exists" sort of thing! trying to do this in the criteria field on the query.

anyone have any ideas or useful resources, ive not done this for a while and cant remember much of IF THEN sort of stuff. mainly not sure if im barking up the right tree, i can search dependent on a set value but not sure how to do it dependant on whats been typed into a form..

any pointers would be appreciated!

thanks!

James

bandr0
06-06-2007, 04:20 AM
ok got a query that searches for duplicates..

but it only searches whats already in the table.. need to search for duplicates of what is in Company box on the form against the table.

wazz
06-06-2007, 10:01 AM
try doing a DLookup on the Before Update event of the form. hth.