Is he running the query directly or is he running a report based on the query? If he's running it directly, what form did you want the notification to take?
If your user is running the query directly (clicking on the query in the database window) then there really isn't anything you can do about the results.
However, a better way would be to set up a form and have the user click a button on the form to run the query. You could then do a preliminary DCount function on the query and check for records. If the Dcount returns zero records then don't run the query. Instead pop-up a msgbox telling the user no records were found.
If Dcount("IDfield","queryname" = 0 then
msgbox "no records"
else
docmd.openquery("queryname"
end if Maq
<insert witty signature here>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.