randomize
rastgelesayi=Int(Rnd*rs.recordcount)

"where kategori_id=2 and id=rastgelesayi" sql de bu kısımla olur sanırım