Bankruptcies are full-blooded credit-killers. When you read that bad credit stays on you for "seven to ten years," the "ten years" part refers to public records. That's the bad news. The good news is that the credit scoring models don't really know how to read public records very well.
Since public records are all listed differently, and since this information comes from county courthouses all over the nation, there's very little consistency between these records. For the most part, these records are simply text fields that the scoring model must somehow "read."
Also, public records must be pulled down by hand by the credit bureaus. This is difficult, error-prone and expensive. In short, there are many holes in the public record reporting system, and most of these inefficiencies lean to the consumer's favor.
When you file for bankruptcy, the accounts that were included in bankruptcy will usually turn up as "Included in Bankruptcy" items. This means that they were part of your supposed bankruptcy. These items are particularly damaging because even if the bankruptcy public record listing itself if removed (which is fairly common), the "included" items will continue to verify the bankruptcy on your credit report. In a sense, "included in bankruptcy" items are just as damaging to your score a bankruptcy listing itself.