Question How to simulate AddNew button ?

vbnotes

New member
Joined
Nov 17, 2007
Messages
1
Programming Experience
Beginner
Hello,

Sorry if it is stupid question but I'm new to VB.NET.

I want to do something like this

VB.NET:
Private Sub myform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.myTableAdapter.Fill(Me.myDataSet.myTable)
Me.myBindingSource.Position = Me.RecordPosition
If Me.RecordPosition > Me.myBindingSource.Position Then
'Me.MyTableAdapter.Insert()
End If

End Sub
Me.MyTableAdapter.Insert() doesn't work, I want to go to a "new record".
I can't find the right syntax. Any idea ? Thanks.

Note: Me.RecordPosition is a user property I assign elsewhere.
 
Last edited by a moderator:
Back
Top