As ojread2 says, any sensible landlord will do a credit check on you which will show that you have unpaid debts. Personally, I wouldn't rent to someone who has a record of not paying money that they owe.
Of course the flipside is that after declaring yourself bankrupt you have more disposable income with which you can pay the rent.
I assume that you have had severe financial problems which have led to bankruptcy..this will mean that your credit rating probably isn't too healthy anyway.
Pippa's answer indicates what is probably the case - in other words, you may well have difficulty renting privately because of your credit record even if you are not bankrupt.
You will probably need a guarantor - who will also be credit checked.