sex after miscarriage

How long did you wait to have sex after a miscarriage? Did you have a check up first or did you just go for it once you stopped bleeding?.....It's been two weeks for me since I've had a natural miscarriage with no major complications and we are wanting to start having sex again but I don't want to get an infection.