If you end up in a situation where you need to buy before your home sells, you risk having two mortgage payments at the same time. You might not be able to access your down payment funds, either. It's a tough situation, but there are ways around it.
Get a Head Start
If you see a house you'd like to buy, but your down payment funds are tied up in the equity in your current house, your purchase will be contingent on selling first. Talk to a real estate agent to see how long houses are sitting on the market in your area. If it will take a while for your house to sell, list it early. You may have to price it slightly under market value so it sells faster.
Delayed Buy-Side Closings
When your buy-side transaction moves too fast, talk to the seller or have your agent talk to the buyer's agent. You may be able to delay the closing. Some sellers will delay out of the goodness of their hearts, while others will charge you for it. Another option, if you can afford two payments but need down payment money, is to try to convert your purchase into a lease option. That way, the seller gets some money, but not the full down payment, and you can purchase the house at a fixed price when your house sells.
Become a Landlord
If you can't sell your house in a reasonable amount of time, becoming a landlord could be another option. If the market supports it, you may be able to rent your house out for enough money to cover your property tax, mortgage and expenses, with a little left over. While you're collecting the rent, you're also receiving valuable tax deductions and paying the mortgage down on your old house, building equity. This strategy only works if you have enough income to support both mortgages for the bank's underwriting process, unless your lender will count the rent. You also won't be getting any sale proceeds for your down payment if you do this.
When you have to buy before you sell and you don't have the money to make your down payment, your final option is to take out a bridge loan. A bridge loan is a short-term loan for your down payment. When you finally sell your house, the proceeds will pay off the bridge loan. While some banks make bridge loans, you might do better borrowing the money from a family member or friend.