Yes, the Immigration Law provides for the possibility of obtaining a residence permit in Latvia for the period of study in an accredited secondary school, but with an important caveat: this type of residence permit is granted only to persons who have not yet reached the age of majority. This means that your child must be under 18 years old at the time of obtaining the residence permit and the beginning of school. In other words: if your son is about to turn 18, then this type of residence permit will not suit him, because you simply will not have enough time to go through the entire procedure.