Ok, bellow is an example
Public Sub dInserir_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles dInserir.Click
Dim db As DAO.Database
Dim rs As DAO.Recordset
db = DAODBEngine_definst.Workspaces(0).OpenDatabase(letra)
rs = db.OpenRecordset("Select Max(n_cliente) As MC From DEPOSITARIOS")
UPGRADE_ISSUE: Data property Data1.Recordset was not upgraded. Click for more: ms-help://MS.VSCC/commoner/redir/redirect.htm?
keyword="vbup2069"
Me.Data1.Recordset.AddNew()
Me.Text1.Text = rs.Fields("MC").Value + 1
Me.Text2.Focus()
End Sub
OR THIS
If mess = CStr(MsgBoxResult.Yes) Then
Me.Data1.Recordset.Delete()
Me.Data1.Recordset.MoveFirst()
Else
nada
End If