Find Duplicates Query

mlopes1

Registered User.
Local time
Today, 03:40
Joined
Sep 4, 2002
Messages
76
I am running a Find Duplicates Query when a button is selected on a form. Is there a way, in Vb or otherwise, to check if the query returned any results. In other words, the user clicks a button, the query runs in the background and IF it returns no duplicate values one thing should happen, and if it returns some duplicates, another thing should happen.

Thanks,

marco
 
This should work:

dim db as database
dim rst as recordset
set db=currentdb
set rst=db.openrecordset("yourFindDupesQuery")
if rst.eof then
do your no records stuff
else
do your found records stuff
end if
 

Users who are viewing this thread

Back
Top Bottom