Most dogs form an incredibly strong bond with their owners and having that owner go missing for even a few hours is enough to upset the dog enough to make them physically ill.
Sometimes this is due to anxiety. Dogs that have separation anxiety can vomit or get diarrhea when their owners leave the house, but then have none of those problems when the owner is home.
If you think your dog is making himself sick due to anxiety, there are a couple things you can try when you have to leave the house:
Melantonin is an over-the-counter drug that can be used to treat some anxiety issues in dogs. The dose you would give would be 0.5 to 1 mg per dog orally whenever necessary up to every 8 hours. More information can be found here: http://www.petplace.com/drug-library/melatonin-melatonex/page1.aspx , which includes risks, warning signs to watch out for and other bits of useful information.
Try a DAP collar. These are collars that are impregnated with a man-made version of the dog appeasing pheromone, which is a pheromone that nursing bitches give off to their pups to help them feel calm and secure. It's something that humans can't smell, but it has an amazing effect on dogs with anxiety and other issues. Although you can find them at your vet's office..you can also find them online at places like Amazon.com and Ebay for much cheaper. Just make sure they're DAP brand, as they seem to work better than some other versions.
I hope this helps!!