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

I am surprised that noone can help on this question as I am sure to those who are more skilled than a newbie like me must know how to open a form and allow the user to put a new record in without clicking the New Record button. It would be really useful if someone could help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.