I was like this as a kid, I had so many tests, x rays, a barium meal, ultra sounds you name it. Finally worked out as an adult that it was milk, the pains stopped along with my headaches too.

Dd1 complains of a sore tummy and in her case it's related to her not wanting to poo on the toilet she holds on and it gets very painful for her.