Hello All:
I have an application with two forms. The first for has a listbox on it that displays a list of students. The second form is the form where you would enter all the student information in...when you click save it rights the info to a comma delimited file. There is a view button on the main form that when you select a student from the list box and then click view, what should happen is that the second form opens and displays only that students information. I created a loop on the click event of the view button that opens the text file, reads it in line by line into a variable, there is some string manipulation that is done that puts the individual pieces of information into other variables ie. pulls the last name out of the string and puts it in a last name variable etc. Now, I have 18 variables with correct information in them just waiting to display themselves on the second form in the appropriate fields, and I can't figure out how to get them there. I figure I probably have to pass the values somehow from the main form to the second form...but not sure how to do this. I tried creating a procedure that is called after my loop populates all the variables and pass the variables as parameters to this procedure, but I got a message that I am passing too many parameters. Hope someone can tell me the correct way of doing this.
Thanks ....you guys are great...got some help the other day and it worked great.
Alex
I have an application with two forms. The first for has a listbox on it that displays a list of students. The second form is the form where you would enter all the student information in...when you click save it rights the info to a comma delimited file. There is a view button on the main form that when you select a student from the list box and then click view, what should happen is that the second form opens and displays only that students information. I created a loop on the click event of the view button that opens the text file, reads it in line by line into a variable, there is some string manipulation that is done that puts the individual pieces of information into other variables ie. pulls the last name out of the string and puts it in a last name variable etc. Now, I have 18 variables with correct information in them just waiting to display themselves on the second form in the appropriate fields, and I can't figure out how to get them there. I figure I probably have to pass the values somehow from the main form to the second form...but not sure how to do this. I tried creating a procedure that is called after my loop populates all the variables and pass the variables as parameters to this procedure, but I got a message that I am passing too many parameters. Hope someone can tell me the correct way of doing this.
Thanks ....you guys are great...got some help the other day and it worked great.
Alex