Sex while treating a yeast infection?

I have a yeast infection and I just started a treatment with vaginal cream. The treatment is supposed to last a whole week. Am I allowed to have sex during treatment? And if I can, will it get all messy with vaginal cream goin everywhere?? Any advice?