Unfortunately, the answer is no. Flu vaccines do not prevent the stomach flu. The reason is that the stomach flu is not a type of the flu at all. It is a virus, or in some cases a bacteria, but it is not related to the influenza virus that causes seasonal flu. It is more accurately known as gastroenteritis, but that is an awfully big word, so most people just call it the stomach flu.
Sadly, there is no vaccine to prevent the stomach flu. If you get it, you usually just have to suffer through. You should know what to watch for if you do have these symptoms, however, so you know when you should go to the doctor for vomiting and diarrhea.
Occasionally, people who have the seasonal flu will have vomiting and diarrhea, but they will also have symptoms of an upper respiratory infection (congestion, coughing, sore throat, etc.) and are typically children. More often, H1N1 (swine flu) causes vomiting and diarrhea, but other symptoms such as sore throat or a cough are present as well. When the only symptoms are vomiting, diarrhea and fever, what you most likely have is a stomach virus, not the flu.
So, don't think the flu shot didn't work! Still not convinced? Find out why you may still get sick after you get a flu shot.
Sources:
"How Well Does the Seasonal Flu Vaccine Work?" Seasonal Influenza (Flu) 08 Jul 09. Centers for Disease Control and Prevention. 19 Mar 10.



