试一下:
sm = "... "
rec1.open sm
if rec1.recordcount > 0  then ' if rec1.bof() or rec1.eof() then
   ...
endif