Ejemplo de código en VB6

PENSANDO EN LA SIGUIENTE VENTANA (SIN FIJARSE EN LOS ERRORES DE VISUALIZACIÓN TENEMOS QUE…

…LOS CÓDIGOS DE LOS BOTONES SERÍAN: (TOMANDO EN CUENTA QUE LOS OBJETOS NO CAMBIARON DE NOMBRE Y OTROS DETALLES).







Private Sub Command1_Click()
'anadir un nuevo registro vacio
Data1.Recordset.AddNew
TEXT1.SetFocus
End Sub

Private Sub Command3_Click()
Dim aqui As String
x = InputBox$("Tecle La clave del registro", "Buscador Abarrotes")
aqui = "Clave='" + x + "'"
Data1.Recordset.FindNext aqui
If Data1.Recordset.NoMatch Then
MsgBox "No existe el registro"
End If
End Sub

Private Sub Command4_Click()
Form2.Show
Form3.Hide
End Sub

Private Sub Command5_Click()
Data1.Recordset.Edit
End Sub

Private Sub Command6_Click()
Dim tipo_msgBox As Integer
Dim msg As String
'icono Stop+Acepta+Cancelar=17
tipo_msgBox = 17
msg = "¿Esta usted seguro de que quiere borrar el registro?" & Chr$(10)
msg = msg & TEXT1.Text
If MsgBox(msg, tipo_msgBox, "¿Borrar Registro?") <> 1 Then
Exit Sub
End If
'Borrar el registro
Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub Text1_GotFocus()
'seleccionar el texto de la caja
TEXT1.SelStart = 0
TEXT1.SelLength = Len(TEXT1.Text)
End Sub

Private Sub Text2_GotFocus()
'seleccionar el texto de la caja
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End Sub

Private Sub Text3_GotFocus()
'seleccionar el texto de la caja
Text3.SelStart = 0
Text3.SelLength = Len(Text3.Text)
End Sub

Private Sub Text4_GotFocus()
'seleccionar el texto de la caja
Text4.SelStart = 0
Text4.SelLength = Len(Text4.Text)
End Sub

Private Sub Text5_GotFocus()
'seleccionar el texto de la caja
Text5.SelStart = 0
Text5.SelLength = Len(Text5.Text)
End Sub

Private Sub Text6_GotFocus()
'seleccionar el texto de la caja
Text6.SelStart = 0
Text6.SelLength = Len(Text6.Text)
End Sub

Private Sub Text7_GotFocus()
'seleccionar el texto de la caja
Text7.SelStart = 0
Text7.SelLength = Len(Text7.Text)
End Sub

Private Sub Text8_GotFocus()
'seleccionar el texto de la caja
Text8.SelStart = 0
Text8.SelLength = Len(Text8.Text)
End Sub

¡PIÉNSALE UN POCO QUE DEBES MODIFICAR!