Can I collect rent after you have filed the eviction?

Most judges will DISMISS an eviction case for nonpayment of rent if a landlord accepts rent from a tenant after the eviction was filed.