Try Using It in your update button:
Try
da = New OleDbDataAdapter("SELECT * FROM NamesList WHERE ID", conn)
Dim cmd As New OleDb.OleDbCommand
Dim Str As String
Str = "update tablename set columnName="
Str += """" & textbox1.text & """"
Str += " where ID="
Str += Label6.Text.Trim()
cmd = New OleDbCommand(Str, conn)
cmd.ExecuteNonQuery()
ds.Clear()
da.Fill(ds, "tablename")
MsgBox("Updated Successfully...")
Catch ex As Exception
MsgBox(ex.Message & "," & ex.Source)
End Try
Delete Button
If MsgBox("Are you Sure you want to Delete this record?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Delete") = vbYes Then
Try
Dim sql As String = "delete from TBLName where ID =" & DataGridView1.SelectedRows(0).Cells(0).Value & ";"
Dim cmd As New OleDbCommand
cmd.Connection = conn
cmd.CommandText = sql
cmd.ExecuteNonQuery()
MsgBox("Successfully Deleted!", MsgBoxStyle.Question Or MsgBoxStyle.Information, "Information")
Catch ex As Exception
MessageBox.Show("Please Select First!")
End Try
Else
MsgBox("Deleting Files is Cancelled!", MsgBoxStyle.Question Or MsgBoxStyle.Information, "Information")
End If