Antibiotics are indicated only in acute gastroenteritis caused by bacteria which is tested from stool. Stomach ache is not treated with antibiotics.
However, if there is a bacteria in stoamch called Helicobacter pylori associated with gastritis or ulcer, treatment with antibiotics is given to eradicate this bacteria. The eradication need to be confirmed subsequently 3 months later with yurea breath test.