The problem of lactose intolerance
and gastrointeritis can cause the change in the color of the stool.
The important thing is that you have to take care of your son for the gastroenteritis
and have treatment for this and as you told that he has frequent tummy ache and loose bowels show that he is having problem with diet with lactose.
Once the problem of gastroenteritis is treated I would suggest you to take care of diet which is strictly free from lactose and make it sure.
Because lactose intolerance can itself present in the form of gasterointeritis and frequent tummy ache and loose bowels. Another important thing regarding lactose intolerance is that it is there for long time and sometime permanent and the person suffering has to avoid anything having lactose. So it is important to control the diet in all cases of lactose intolerance.
Thanks and take care.