I am using MS VB 2008 Express Edition
I have a form that allows users to put details in various text boxes associated with a database. The form has the usual VB tool bar buttons such as add new, Save and so on. What I want is that when the form is opened it automatically starts wih a new record so that the user does not need to know that he or she has to click on New. The load instructions currently are:
____________________________________________
Private Sub SafeRecords_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'SafeBoxDataSetIdentityType.tblIdentityType' table.
Me.Refresh()
Me.TblIdentityTypeTableAdapter.Fill(Me.SafeBoxDataSetIdentityType.tblIdentityType)
frmLogin.Close()
frmCreateAcct.Close()
frmStartUp.Hide()
'TODO: This line of code loads data into the 'SafeBoxDataSet.tblSafe' table.
Me.TblSafeTableAdapter.Fill(Me.SafeBoxDataSet.tblSafe)
'TODO: This line of code loads data into the 'SafeBoxDataSet.tblAdditionalSafeInfo' table.
Me.TblAdditionalSafeInfoTableAdapter.Fill(Me.SafeBoxDataSet.tblAdditionalSafeInfo)
End Sub
_____________________________________________
Can anyone give me the code to start a new record when the form is loaded please
Bernard