It is a good idea to make sure that you don’t have funds in bank accounts at banks you owe money to, particularly if you are going to file for bankruptcy.  Banks will often keep the funds in your account on the day your file for bankruptcy to set off against the debt owed to them.
However once the bankruptcy is filed, the bank has no right to keep any funds deposited to set off for any debt owed before the bankruptcy was filed.
If they do, they are likely violating the bankruptcy laws and you may have a right of action against the bank.  See an attorney if you think that any creditor is doing something wrong.
From www.bankruptcylawnetwork.com by Susanne Robicsek, North Carolina Bankruptcy Attorney