Mi rispondo da solo ho fatto cosi:

if (rs.Recordcount = 0) then

Msgbox

else

msgbox

end if