-
Apr 25th, 2009, 08:51 PM
#1
Thread Starter
Junior Member
students(i).teacher results into listbox
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
-
Apr 26th, 2009, 02:06 AM
#2
Thread Starter
Junior Member
Re: students(i).teacher results into listbox
err... fugettaboutit. I figured it out by creating a new array 'TeacherXYZ' based on the criteria
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|