Long before a parent needs to have “the talk” with their child they need to discuss God with them.
A father should tell his son(s) and daughter(s), we have one Father, even God in Heaven, and ask the children to call himself by his first name, rather than father or dad. Matthew 23:9 KJV.
As soon as a child can comprehend who God is, tell him or her about Jesus, the only begotten Son of God who died on the cross for our sins and lived to show us how to live by following his Holy Father, our Father.
Conversations with children should include informing them of the Ten Commandments and the statutes and precepts of the Lord. I don’t necessarily think you need to go into detail about what adultery is, but a careful conversation on adultery might make “the talk” easier at a later date.
Keep in mind “the talk” probably needs to take place earlier than you think. Kids pick up a lot from what’s on television and at school.
When your child is ready, let them repent of their sins and be baptized in the name of Jesus. Mark 16:16
Only by frequent conversations with your children will they be able to make it to Heaven. Remember that children key off what they see. If you live righteously you can teach your children to live likewise!