Antibiotics and the pill

I've been put on the antibiotic "macrobid" to treat my UTI, i was wondering if taking this will affect the effectiveness of my pills in anyway?  and does anyone know how to prevent UTI's?! i always get them whenever me and my boyfriend would have a lot of sex in one day.... and it's very annoying to have to go to the clinic to get medication.