I have a Combobox which is filled with various types of search on an Access database. For example:
List all students by class
Total paid this month
Total paid this Student
Count Active/Inactive students
etc.
A DataGrid is filled with the database interrogation results.
I also have a series of textboxes which display the information for each student: Name, Group, Payment method, telephone etc.
At present, If I want use the Datagrid to display, for example, the list of students, and I then want to look at the details of one of those students, I have to select that name from a different combobox before filling the textboxes.
What I want to do is simply click on the name in the datagrid and the details are automatically displayed in the textboxes. I have tried the .Click event and return .Text but that doesn't return the text in the currently clicked cell. It returns the data from the PREVIOUSLY clicked cell.
I have played about with various events and searched this forum and the internet to try to find a solution but I cannot find any way to get the text in the clicked cell immediately. Most examples around show how to get the .Text by pressing a button, but I don't want to do that. Can anyone help?
List all students by class
Total paid this month
Total paid this Student
Count Active/Inactive students
etc.
A DataGrid is filled with the database interrogation results.
I also have a series of textboxes which display the information for each student: Name, Group, Payment method, telephone etc.
At present, If I want use the Datagrid to display, for example, the list of students, and I then want to look at the details of one of those students, I have to select that name from a different combobox before filling the textboxes.
What I want to do is simply click on the name in the datagrid and the details are automatically displayed in the textboxes. I have tried the .Click event and return .Text but that doesn't return the text in the currently clicked cell. It returns the data from the PREVIOUSLY clicked cell.
I have played about with various events and searched this forum and the internet to try to find a solution but I cannot find any way to get the text in the clicked cell immediately. Most examples around show how to get the .Text by pressing a button, but I don't want to do that. Can anyone help?