It could be somekind of a milder case of IBS (Irritable Bowl Syndrome), supposedly up to 1/3 of otherwise healthy people have that.
Having this in an extra severe form I have tried almost everything and know that you should be really careful about trusting doctors too much, most doctors know to little about this and can give advice that makes it worse in the long run. I was on antacid treatment a long time and thought it was helping at least a bit, unfortunately antacid makes IBS worse over time and should be avoided. I´ve learned that antacids are supposed to work completely or it´s the wrong thing to use and can make things worse (giving that you´re on the right amount of a strong enough kind).
If it is IBS there´s not much to do besides learning to relax and accept the problem (sounds negative, but it´s an incurable decease and accepting this usually makes the problem smaller). In some cases a special case of hypnose is helpful, but it´s supposed to be hard to go through and hardly worth it if its a minor problem. There are drugs being developed that probably can help a bit, but most drugs they have tried hasn´t had more effect than placebo.
But check up with your doctor first, it might be something curable, and if it is it´s unnecessary to suffer.
//Jenny