Even before baptism, a child or an adult can have the Holy Ghost testify to their hearts of sacred truth. They must act on that testimony to retain it, but it will guide them toward goodness.
We cannot control what others choose to do, and so we cannot force our children to heaven, but we can determine what we will do. And we can decide that we will do all we can to bring down the powers of heaven into that family we want so much to have forever.