You should really not be taking any more meds to stop things like this, but you should be looking at lifestyle issues instead.
Firstly, you need to look at your diet and alter or change this if deficient. You should then be taking Metamucil that is water soluble fiber and is good for constipation and diarrhea. Your GI system cannot function without fiber and it will help bind your stools up.
You can also consider taking calcium supplements. This helps your bowel to absorb water naturally. Also, for help with bloating, take Acidophilis caps twice daily on an empty stomach and keep them in the fridge. If you have fequent diarrhea then your gut flora will be out of balance and Acidophilis contains the good bacteria that can give you this balance back. You can do this or eat some live yogurt that also contains the cultures.
If you have diarrhea, your potassium may also be low, so it may be worth your while eating a few bananas.
Remember that not everything can be sorted out with meds. Try tackling the causes rather than just treating the symptoms and you can achieve a cure.