This code defines the behavior of controls on a Windows form for viewing and editing data bound to a Table1BindingSource. Buttons move the cursor through records, add or remove records from the binding source, and save or cancel changes. The form loads data on initialization from a Table1 table into the binding source using a Table1TableAdapter.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
28 views
Table1Bindingsource - Moveprevious : Form1
This code defines the behavior of controls on a Windows form for viewing and editing data bound to a Table1BindingSource. Buttons move the cursor through records, add or remove records from the binding source, and save or cancel changes. The form loads data on initialization from a Table1 table into the binding source using a Table1TableAdapter.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Your_databaseDataSet.Table1' table. You can move, or remove it, as needed. Me.Table1TableAdapter.Fill(Me.Your_databaseDataSet.Table1)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Table1BindingSource.AddNew() End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Table1BindingSource.MoveNext() End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Table1BindingSource.EndEdit() End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Table1BindingSource.RemoveCurrent() End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click