A foreclosure can affect your credit score and your ability to purchase another home. It stays on your credit report for 7 years from the date of your delinquency.
You can recover, however. It's still possible to purchase a home after foreclosure or bankruptcy. How fast you do so depends on a few factors, including the type of bankruptcy you undergo and the mortgage investor associated with your loan. When you want to purchase a new home after foreclosure, shop around among mortgage lenders, because each one has its own requirements.
Note that you may still owe money after a foreclosure. If your lender can’t sell the home for enough money to cover everything you owe, a court might file something called a deficiency judgment against you. This means you must pay the difference between the amount you owe on your mortgage and what your lender earned when selling your home through foreclosure.