Hi, I'm working on a program that organizes students and their information (from a textfile) for a school of disabled children. This is a project for my intro to vb course. I can't work my head around how to output each class they are in, so any help would be greatly appreciated

The textfile has the student structure:
firstName
lastName
sex
age
diagnosis
wheelchair
verbal [score]
hyper [score]
emotion [score]
total [score]
motor
teacher
teacherFloor

Currently all I have the form do is bubble sort the list based on students(i).teacher and output all the information in a formatted string..

However it would be much better if I could have it output in the following way:
Teacher1 -- Floor #
Student...
Student...
Student...

Teacher 2 -- Floor #
Student...
Student...
etc

etc
you get the idea

So I'm not really sure how to go about organizing and outputting based on teacher...specifically where to have the loop. Right now it seems to loop infinitely

My current code is
Code:
        For i = 0 To students.GetUpperBound(0)
            Do While students(i).teacher = "Bob"
                lstResults.Items.Add(students(i).lastName)
            Loop
Next

Thank you