oreclosures or deed in lieu of foreclosure are serious negative pieces of information on your credit history. They are directly associated with bankruptcy, and they can drop your FICO credit score by over a hundred points, depending on where it is when the bank forecloses.
In most cases, it can take several years of on-time payments to rebuild your FICO credit score, and as many as seven years for the effect of either of these two unfortunate events to clear away.