Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
conn.Open()
Dim cmd As New OleDbCommand("Update (SELECT Employee.empno, Employee.emplname, Employee.empfname, Employee.empmidname, Employee.contactno, Admin.description FROM Admin INNER JOIN Employee ON Admin.adminNo = Employee.adminNo) Set emplname=?, empfname=?, empmidname=?, contactno=?, description=? where empno=?", conn)
cmd.Parameters.Add("empno", OleDbType.Integer)
cmd.Parameters.AddWithValue("emplname", OleDbType.Char)
cmd.Parameters.AddWithValue("empfname", OleDbType.Char)
cmd.Parameters.AddWithValue("empmidname", OleDbType.Char)
cmd.Parameters.AddWithValue("contactno", OleDbType.Integer)
cmd.Parameters.Add("description", OleDbType.Char)
cmd.Parameters("empno").Value = empno.Text
cmd.Parameters("emplname").Value = lname.Text
cmd.Parameters("empfname").Value = fname.Text
cmd.Parameters("empmidname").Value = midname.Text
cmd.Parameters("contactno").Value = contactno.Text
cmd.Parameters("description").Value = description.Text
cmd.CommandType = CommandType.Text
Dim oleAdapter As New OleDbDataAdapter
oleAdapter.UpdateCommand = cmd
oleAdapter.UpdateCommand.ExecuteNonQuery()
MsgBox("Record Updated!", MsgBoxStyle.Information)
conn.Close()
End Sub