A foreclosure has adverse effects on your credit and your ability to obtain credit in the future. The length of time that the foreclosure remains on your credit report is seven years.
Just exactly how it affects your credit really depends on your credit history as well as how a lender reports your situation to credit bureaus. Lenders have the ability to report late payments up until the sale of the foreclosed property. That being said, make sure you check your credit after the foreclosure is complete.
Before the foreclosure process begins be sure to contact your lender immediately. They are usually willing to work with you in situations like these. Please, visit this site. It has great information on how to avoid foreclosure and gives you some alternatives as well.