Verifica che la query ti restituisca qualcosa....

codice:
if not TabRs.EOF then
...
else
...
end if
Roby