yes you can have sex when you have a cold assuming your partner is willing to take the risk of sharing your cold or the minor distraction of having you sneeze or cough during an intimate moment. if you feel well enough to have sex it's okay to do it.
is it safe to have sex while having a common cold?