First of all, if you have a lease, you will not have to move. A new owner must honor any written lease you have. If you don't have one, then ask the currrent owner if he/she will sign one with you.
If you do have to move, ask the landlord if he/she will give you a letter of recommendation. If you were always on time with the rent, that shouldn't be a problem.
Sometimes bad things happen to good people. If a prospective landlord sees good payment history, that usually means more than the bankruptcy, but it is always a judgement call on their part.