im having a problem with my database

this is my partial screenshot of the form:
http://i43.photobucket.com/albums/e355/bettybarnes/untitled.jpg


i want to have a form with the list of employee's id & names on the left side, and when i click it, it will display on the Personnel/employee tab? I don't have a code for that because i don't know how to start. if you know how this works please tell me i won't copy all the codes but i'm going to study and learn from it.. thanks in advance to those who will help me.

since u r using datagridview on the left side, why dont u use a detailgridview inside the tab control, so when u click from the left, u get to see the details on the right. i only tried that once, but it might work, all u ve to do is connect the detailgridview with the datagridview.

Hey,
If i got that right, when the user clicks one row on the Employees Grid, then you want to show all the info that are related to the selected Employee. Here's a simple way to do this:

Catch the SelectedRowChanged event on the grid. Then get the value of the first cell of the grid(in your case its the EmpId) and then run an SQL Query on the db and fetch all the Employee data. When you do that, then all you have to do is to change the Textboxe's Text property with the data you want.

Hope i helped.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.