Although a foreclosure will not impact your own credit, as stated in the previous answers, I just want to make sure you know that there are other options for your husband. You can sell your home even if the amount of the home sale would not cover the mortgage(s) and closing expenses. This is called a short sale.
You put your home on the market with a Realtor at a realistic market price. When there is an accepted offer, the Realtor helps you negotiate with the bank(s).
Credit-wise for him, this is preferable to foreclosure. Emotionally, it may be preferable, too. I am currently representing two sellers in a short sale. They feel as if they have more control over the situation. There is no foreclosure on their record. It is looked at as more honorable, by far. And it costs them no money.
The only reason to go all the way to foreclosure is if you can't yet afford to move. You can stay in a foreclosed home for six months after the sheriff's sale without paying on the mortgage.
If you want to consider the short sale route, contact a Realtor who has experience doing them. I would be happy to help you, if you need representation, or just more guidance.
Best of luck to you. I know this is very hard.