Bactrim is usually taken with a full glass of water to prevent kidney stones. It can be taken with or without food, but if stomach upset occurs, take it with food or milk. It is crucial to complete the full course of the medication, even if you feel better after a few days.