Some people have problems digesting milk protein or milk sugar (lactose intolerance). However, these problems are very rare in babies. Until your health professional can evaluate your baby, it is usually not advisable to switch formula or stop breast-feeding as a means to remedy suspected food digestion problems.
Research indicates that a vast majority of babies diagnosed with colic do not have health problems that affect digestion.1 However, a variety of factors can cause some degree of abdominal gas, which can make crying worse.
If your health professional has prescribed medication to reduce gas, use it exactly as prescribed.
Citations
Overby KJ (2003). Crying and colic section of Pediatric health supervision. In CD Rudolph et al., eds., Rudolph's Pediatrics, 21st ed., pp. 34–35. New York: McGraw-Hill.
Duro D, et al. (2002). Association between infantile colic and carbohydrate malabsorption from fruit juices in infancy. Pediatrics, 109(5): 1–15.
WebMD Medical Reference from Healthwise