I have a form that uses two tables (Pupil ID & Admit Withdraw). The list of pupils attending a specific school (Pupil ID table) is the main form. I have a subform which displays the admit/withdraw history (Admit Withdraw table) for that pupil. Everything works fine except that I would like to sort the main form based upon the number of rows of data for that pupil in the subform. In other words, I want the students who have the most number of admits/withdraws to sort to the top.