From my understanding, a foreclosure will stay on your record for 7 to 10 years. Regardless what happens to the property, it will still show adversely on your credit. Your credit report is a documentation of your payment history, almost like a report card. Just because they took back the home does not change the fact payments were late and the foreclosure happened.
I hope this helps!
As far as getting it removed off your credit report, I've heard credit repair companies claim they can remove them, but I've yet to see any removed.
Anna Maria Durr, NMLS 266699, TREC 596662, Codemark Financial,
2626 Richmond Ave., Houston, Texas, 77098, 281-592-0667