Private Sub Command1_Click()
Adodc1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.Update
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.Delete
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MovePrevious
End If
End Sub
Private Sub Command5_Click()
Dim buscar As String, criterio As String
buscar = InputBox("POR FAVOR INGRESE EL NUMERO DE DNI", "busqueda por nombre", vbQuestion)
If buscar = "" Then Exit Sub
criterio = "DNI like '*" & buscar & "*'"
Adodc1.Recordset.MoveNext
If Not Adodc1.Recordset.EOF Then
Adodc1.Recordset.Find criterio
End If
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find criterio
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
respuesta = MsgBox("NO EXISTEN REGISTROS DIGITALIZADOS DE ESE DNI", vbCritical)
End If
End If
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub IMPRIMIR_Click()
Set DataReport1.DataSource = Adodc1.Recordset
DataReport1.Show
End Sub