TECNOLOGÍA E INFORMÁTICA

Un cordial saludo para todos los chicos y chicas del Área de Tecnología e Informática de los grados séptimo a Undécimo de la Jornada Mañana en la Institución Educativa San Pedro Claver de Puerto Boyacá. En este pequeño espacio encontraran en Plan de área de la asignatura y la teoría vista en clase presencial para reforzar lo visto en ella.


BUSCAR 1101

 Private Sub buscar_Click()

Dim buscado As String, criterio As String
If Option1.Value = False And Option2.Value = False And Option3.Value = False Then
         Mensaje = MsgBox("SELECCIONA UNA OPCION DE BUSQUEDA", vbCritical, "SELECCIONAR OPCION")
Else
     If Option1.Value = True Then
        buscado = InputBox("¿CEDULA DEL DOCENTE:?")
       If buscado = "" Then Exit Sub
          criterio = "CEDULA like '*" & buscado & "*'"
          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
            MsgBox ("CEDULA NO ENCONTRADA")
          End If
       End If
    Else
       If Option2.Value = True Then
          buscado = InputBox("¿NOMBRES DEL  DOCENTE:?")
          If buscado = "" Then Exit Sub
             criterio = "NOMBRES like '*" & buscado & "*'"
             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
                   MsgBox ("NOMBRE NO ENCONTRADO")
                End If
             End If
       Else
          buscado = InputBox("¿APELLIDOS DEL DOCENTE:?")
          If buscado = "" Then Exit Sub
          criterio = "APELLIDOS like '*" & buscado & "*'"
          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
               MsgBox ("APELLIDO NO ENCONTRADO")
            End If
          End If
    End If
End If
End If
End Sub

No hay comentarios:

Publicar un comentario

No dejes de comentar!!!