Bacteria needs 3 things to flourish: moisture, food and warmth. Your baby's formula provides all these things. When you bottle feed your baby you need to be careful that all equipment is first cleaned and then put in a baby bottle sterilizer. To restrict the growth of bacteria you can remove the warmth by keeping any formula you prepare in advance in the body of your refrigerator, not in the door. Don't give your baby formula that has been prepared more than 24 hours, even if it has been stored in the fridge.
If you DON'T have access to a refrigerator while you're out, the safest way to transport formula is to take your baby's bottle with ONLY the measured amount of boiled water. Carry the correct number of scoops of powdered formula separately in a small container. (Remember bacteria need all three - food, warmth and moisture to flourish. By carrying the formula powder separately and adding it at the last minute, you reduce the risk of bacterial growth.)
DON'T carry warm formula when you go out, as bacteria can quickly grow in the warm milk. If formula is already prepared in the bottle, ensure that it is icy cold before being transported in an insulated container and only heat it just before feeding.