G
Guest
I am new to coding and vb. I need some help on how to delete a record from a
datagrid that I have in a form. I am unable to locate any info on the web
(it seems as though it is all asp) or from the help file. Below I have given
two examples of code that I am working with, one is to load my datagrid and
the other is to update my datagrid. Can someone please help with deleting a
record from my datagrid?
Private Sub Book_Load
School11.Clear()
OleDbDataAdapter1.Fill(School11)
End Sub
Private Sub btnUpdate
Dim mynumber As Double
Me.BindingContext(School11, "Student").AddNew()
OleDbDataAdapter1.Update(School11)
MessageBox.Show("Database has been updated")
btnReload_Click(sender, e)
Me.BindingContext(School11, "Student").Position =
BindingContext(School11, "student").Count + 1
mynumber = Val(txtPhoneNumber.Text)
txtPhoneNumber.Text = Format(mynumber, "(###)-###-####")
End Sub
datagrid that I have in a form. I am unable to locate any info on the web
(it seems as though it is all asp) or from the help file. Below I have given
two examples of code that I am working with, one is to load my datagrid and
the other is to update my datagrid. Can someone please help with deleting a
record from my datagrid?
Private Sub Book_Load
School11.Clear()
OleDbDataAdapter1.Fill(School11)
End Sub
Private Sub btnUpdate
Dim mynumber As Double
Me.BindingContext(School11, "Student").AddNew()
OleDbDataAdapter1.Update(School11)
MessageBox.Show("Database has been updated")
btnReload_Click(sender, e)
Me.BindingContext(School11, "Student").Position =
BindingContext(School11, "student").Count + 1
mynumber = Val(txtPhoneNumber.Text)
txtPhoneNumber.Text = Format(mynumber, "(###)-###-####")
End Sub