potresti fare :
Set RS = DB.OpenRecordset(sQL)
if rs.recordcount=0 then
msgbox "aaaaa"
end if