
Patrick B. answered 07/19/19
Math and computer tutor/teacher
Sounds like you want a ComboBox on Form2.
Where are the students' names coming from? text file? database?
Load the name of the students into a GLOBAL array.
When form2 loads ( LOAD event) populates the combo box with the students names.
You may have to configure the combo box so that it will search by last name when
the contents of the textbox changes
I also have to ask what is form2 doing with the names of the students. I you already have the data on
form1, why are you opening another form? I am GUESSING you want to make changes to a student's record.....
If my guess is correct, then READ ON !!!!!
======================================================================
there is a way to open a database table and get READ, UPDATE, INSERT, and DELETE operations on it's records without having to write little or no code. VB has an ODBC driver that will do that for you. There is an ODBC control that you put on the form to connect to the database table. Then you BIND other controls (labels, text boxes, etc) to the data control which then populates these controls with the data from each record. There are 4 stereo buttons that allow you to go to the first, last, next, and previous record. Finally there are buttons for editing the current record as well as deleting it.
Any other customizations will require code, but there is an easier way than what I am guessing you are trying to do.