I have a form that brings up a record from the employees table and displays general starter information (ie, employee ID, first name, last name) and then once I have filled the rest of the textboxes, comboboxes, etc, I need it to populate a different table ("Driver" table).
The picture attached is the form I'm working on. The fields that are populated from the Employees table are:
- Employee
- First Name
- Last Name
- Employee ID
I'd like the form to take the employee ID number and update the table with the information provided from the textboxes.Image may be NSFW.
Clik here to view.
Here is my code, so far:
Public Class frmVehDriver Private Sub frmVehDriver_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'SecurityDataSet.Driver' table. You can move, or remove it, as needed. Me.DriverTableAdapter.Fill(Me.SecurityDataSet.Driver) 'TODO: This line of code loads data into the 'SecurityDataSet.Employees' table. You can move, or remove it, as needed. Me.EmployeesTableAdapter.Fill(Me.SecurityDataSet.Employees) 'TODO: This line of code loads data into the 'SecurityDataSet.Driver' table. You can move, or remove it, as needed. Me.DriverTableAdapter.Fill(Me.SecurityDataSet.Driver) End Sub Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click Me.Validate() Me.DriverBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.SecurityDataSet) MsgBox("Saved") End Sub Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub End Class