Scusa, a monte ti fai una query con il where che vuoi. Se rs.eof = true etc. etc.