According to the following provisions of Canon Law, children who have reached the age of reason cannot be denied the sacraments if they request them. They are prepared just like an adult who is seeking to be admitted to the Catholic Church. It is the responsiblity of the parish priest to make sure they are properly prepared.
Can. 842 §1 A person who has not received baptism cannot validly be admitted to the other sacraments.
§2 The sacraments of baptism, confirmation and the blessed Eucharist so complement one another that all three are required for full Christian initiation.
Can. 843 §1 Sacred ministers may not deny the sacraments to those who opportunely ask for them, are properly disposed and are not prohibited by law from receiving them.
§2 According to their respective offices in the Church, both pastors of souls and all other members of Christ’s faithful have a duty to ensure that those who ask for the sacraments are prepared for their reception. This should be done through proper evangelization and catechetical instruction, in accordance with the norms laid down by the competent authority.
Can. 851 The celebration of baptism should be properly prepared. Accordingly:
1° an adult who intends to receive baptism is to be admitted to the catechumenate and, as far as possible, brought through the various stages to sacramental initiation, in accordance with the rite of initiation as adapted by the Episcopal Conference and with the particular norms issued by it;
2° the parents of a child who is to be baptized, and those who are to undertake the office of sponsors, are to be suitably instructed on the meaning of this sacrament and the obligations attaching to it. The parish priest is to see to it that either he or others duly prepare the parents, by means of pastoral advice and indeed by prayer together; a number of families might be brought together for this purpose and, where possible, each family visited.
Can. 852 §1 The provisions of the canons on adult baptism apply to all those who, being no longer infants, have reached the use of reason.
§2 One who is incapable of personal responsibility is regarded as an infant even in regard to baptism.
Can. 912 Any baptized person who is not forbidden by law may and must be admitted to holy communion.
Can. 913 §1 For holy communion to be administered to children, it is required that they have sufficient knowledge and be accurately prepared, so that according to their capacity they understand what the mystery of Christ means, and are able to receive the Body of the Lord with faith and devotion.
§2 The blessed Eucharist may, however, be administered to children in danger of death if they can distinguish the Body of Christ from ordinary food and receive communion with reverence.
Can. 914 It is primarily the duty of parents and of those who take their place, as it is the duty of the parish priest, to ensure that children who have reached the use of reason are properly prepared and, having made their sacramental confession, are nourished by this divine food as soon as possible. It is also the duty of the parish priest to see that children who have not reached the use of reason, or whom he has judged to be insufficiently disposed, do not come to holy communion.