You are on page 1of 1

Visual Basic simple data base command

Command Add New


With Adodc1 .CommandType = adCmdTable .RecordSource = "table1" .Refresh .Recordset.AddNew End With Text1.Enabled = True Text2.Enabled = True Text1.Text = "" Text2.Text = "" Text1.SetFocus

Command Save
With Adodc1 .Recordset.Save .Refresh End With

Command Next

Command Edit
With Adodc1 .Recordset.Update .Refresh End With

Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast

Command Previous
Adodc1.Recordset.MovePrevious If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst

Command Delete
With Adodc1.Recordset .Delete adAffectCurrent .MovePrevious End With

You might also like