Академический Документы
Профессиональный Документы
Культура Документы
Este es la vincualcion de bisual basic con base de tados botones de accion(microsotf access)
Private Sub buscar_Click()
Dim buscar As String, criterio As String
buscar = InputBox("Que nombre desea buscar?", "busqueda por nombre", vbQuestion)
If buscar = "" Then Exit Sub
criterio = "nombre 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("Alumno no encontrado", vbCritical)
End If
End If
End Sub
Private Sub cancelar_Click()
Adodc1.Recordset.CancelUpdate
ver.Visible = False
Calendario.Visible = False
fecha_nac.Visible = True
sex.Visible = False
sexo.Visible = True
End Sub
End Sub
Private Sub nuevo_Click()
Adodc1.Recordset.AddNew
guardar.Visible = True
cancelar.Visible = True
sexo.Visible = False
sex.Visible = True
ver.Visible = True
fecha_nac.Visible = False
End Sub
Private Sub salir_Click()
End
End Sub
Private Sub ver_Click()
Calendario.Visible = True
End Sub
Private Sub inicio_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub siguiente_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub final_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub anterior_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveFirst
End If
End Sub