In theory you could turn around and buy another house the next day.
Good luck finding a lender to give you the money though.
It also depends on the agreement you make the bank who's accepting the short sale. If you go to your lender and say "hey - i have a financial hardship, i can't afford this place anymore -i'm going broke - help me out here..." and then you turn around and immediately buy another house -that's going to raise some red flags. There's no guarentee they won't try to come after you for the remaining debt on the first house - since clearly you weren't in as bad a spot as you claimed. (that's fraud by the way)