VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "MSCOMCTL.OCX"
Begin VB.Form Form_mant_tall_x_prof 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Mantención de Talleres por Profesor"
   ClientHeight    =   5670
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8055
   Icon            =   "Form_mant_tall_x_prof.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   9963.786
   ScaleMode       =   0  'User
   ScaleWidth      =   8055
   Begin VB.Frame Frame_Asi_x_prof 
      Caption         =   "Talleres por Profesor"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   5415
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7815
      Begin VB.ListBox lst_nombre 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   900
         Left            =   1200
         TabIndex        =   10
         Top             =   600
         Visible         =   0   'False
         Width           =   4095
      End
      Begin VB.CheckBox Check_Letra 
         Caption         =   "Check1"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5400
         TabIndex        =   23
         Top             =   360
         Visible         =   0   'False
         Width           =   255
      End
      Begin MSComctlLib.ImageCombo IC_Letra 
         Height          =   345
         Left            =   3600
         TabIndex        =   22
         Top             =   1800
         Width           =   615
         _ExtentX        =   1085
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         Enabled         =   0   'False
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin MSComctlLib.ImageCombo IC_Nivel 
         Height          =   345
         Left            =   1200
         TabIndex        =   21
         Top             =   1800
         Width           =   615
         _ExtentX        =   1085
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         Enabled         =   0   'False
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin MSComctlLib.ImageCombo IC_Ensenanza 
         Height          =   345
         Left            =   1200
         TabIndex        =   20
         Top             =   1440
         Width           =   3015
         _ExtentX        =   5318
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         Enabled         =   0   'False
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin MSComctlLib.ImageCombo IC_Agno 
         Height          =   345
         Left            =   1200
         TabIndex        =   19
         Top             =   1080
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         Enabled         =   0   'False
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.CommandButton btn_carga_asignaturas 
         Caption         =   "Carga Oculta"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6360
         TabIndex        =   9
         Top             =   1320
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.CommandButton btn_cerr_asi_prof 
         Caption         =   "Cerrar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6360
         TabIndex        =   8
         Top             =   840
         Width           =   1215
      End
      Begin VB.CommandButton btn_lim_asi_prof 
         Caption         =   "Limpiar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6360
         TabIndex        =   7
         Top             =   360
         Width           =   1215
      End
      Begin VB.CommandButton btn_quita_asi 
         Height          =   615
         Left            =   3600
         Picture         =   "Form_mant_tall_x_prof.frx":2A8B2
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   4200
         Width           =   615
      End
      Begin VB.CommandButton Btn_asigna_asi 
         Height          =   615
         Left            =   3600
         Picture         =   "Form_mant_tall_x_prof.frx":2AF0E
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   3240
         Width           =   615
      End
      Begin VB.ListBox lst_asignadas 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   2160
         Left            =   4440
         Sorted          =   -1  'True
         TabIndex        =   4
         Top             =   3000
         Width           =   3135
      End
      Begin VB.ListBox lst_existentes 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   2160
         Left            =   240
         Sorted          =   -1  'True
         TabIndex        =   3
         Top             =   3000
         Width           =   3135
      End
      Begin VB.TextBox txt_nombre 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1200
         MaxLength       =   30
         TabIndex        =   2
         Top             =   360
         Width           =   4095
      End
      Begin VB.TextBox txt_rut 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1200
         TabIndex        =   1
         Top             =   720
         Width           =   1815
      End
      Begin VB.Label Label22 
         Caption         =   "Talleres Asignados"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5040
         TabIndex        =   18
         Top             =   2640
         Width           =   2055
      End
      Begin VB.Label Label21 
         Caption         =   "Talleres Disponibles"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   840
         TabIndex        =   17
         Top             =   2640
         Width           =   2055
      End
      Begin VB.Label Label18 
         Caption         =   "Letra"
         Height          =   255
         Left            =   2640
         TabIndex        =   16
         Top             =   1560
         Width           =   495
      End
      Begin VB.Label Label17 
         Caption         =   "Modalidad"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label16 
         Caption         =   "Nivel"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label lbl_nom_PRO 
         Caption         =   "Nombre"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   13
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label lbl_rut_PRO 
         Caption         =   "Rut"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   720
         Width           =   1335
      End
      Begin VB.Label Label3 
         Caption         =   "Año:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   1095
         Width           =   375
      End
   End
End
Attribute VB_Name = "Form_mant_tall_x_prof"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Btn_asigna_asi_Click()
    Dim cod_tall, Tipo As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    Dim var_sql As String
    If IC_Letra.Text = "" Then
        MsgBox "Debe seleccionar una letra", vbInformation
        Exit Sub
    End If
    If lst_existentes.ListCount < 1 Then
        MsgBox "No hay talleres disponibles para asignar", vbInformation
        Exit Sub
    End If
    If lst_existentes.Text = "" Then Exit Sub
    
    var_sql = "select cod_tall,tipo_tall from talleres" _
            & " where nom_tall = '" & lst_existentes.Text & "' and cod_ens = '" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "' and num_gra = " & IC_Nivel.Text
    objRS.Open var_sql, conn
    cod_tall = objRS("cod_tall")
    Tipo = objRS("tipo_tall")
    objRS.Close
    var_sql = "select concat(ape1_prof,' ',ape2_prof,' ',noms_prof) as nombre" _
            & " from tall_x_cur_prof t,profesores p" _
            & " where cod_tall = '" & cod_tall _
            & "' and cod_ens = '" & Mid(IC_Ensenanza.SelectedItem.Key, 2) _
            & "' and num_gra = " & IC_Nivel.Text _
            & " and let_cur = '" & IC_Letra.Text & "' and agno = " & IC_Agno.Text _
            & " and t.rut_prof = p.rut_prof and tipo_tall = '" & Tipo & "'"
    objRS.Open var_sql, conn
    If Not objRS.EOF Then
        MsgBox "Este taller ya a sido asignado a " & objRS("nombre"), vbInformation
        objRS.Close
        Exit Sub
    End If
    objRS.Close
    var_sql = "insert into tall_x_cur_prof(cod_tall,rut_prof,cod_ens,num_gra," _
            & "let_cur,agno,tipo_tall) values('" & cod_tall & "','" & txt_rut _
            & "','" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "'," & IC_Nivel.Text & ",'" _
            & IC_Letra.Text & "'," & IC_Agno.Text & ",'" & Tipo & "')"
    conn.Execute var_sql
    asignadas
End Sub

Private Sub btn_cerr_asi_prof_Click()
    Unload Me
End Sub

Private Sub btn_lim_asi_prof_Click()
    limpia
End Sub

Private Sub btn_quita_asi_Click()
    Dim var_sql As String
    If lst_asignadas.ListCount < 1 Then Exit Sub
    var_sql = "delete tall_x_cur_prof.*" _
            & " From tall_x_cur_prof" _
            & " where cod_ens = '" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "'" _
            & " and num_gra =  " & IC_Nivel.Text _
            & " and let_cur = '" & IC_Letra.Text _
            & "' and agno = " & IC_Agno.Text _
            & " and cod_tall = (select cod_tall from talleres where" _
            & " nom_tall = '" & lst_asignadas.Text _
            & "' and cod_ens = '" & Mid(IC_Ensenanza.SelectedItem.Key, 2) _
            & "' and num_gra = " & IC_Nivel.Text & ")"
    conn.Execute var_sql
    asignadas
End Sub

Private Sub IC_Agno_Click()
    IC_Ensenanza.Enabled = True
    Set_IC_Ensenanza
End Sub

Private Sub IC_Ensenanza_Click()
    IC_Nivel.Enabled = True
    Call Set_IC_Nivel
End Sub

Private Sub Form_Load()
'    Call Set_IC_Agno
'    IC_Ensenanza.Text = ""
'    IC_Nivel.Text = ""
'    IC_Nivel.Enabled = False
'    Dim i As Integer
'    For i = 2007 To Anno
'        IC_Agno.AddItem i
'    Next i
End Sub

Private Sub IC_Letra_Click()
    Dim var_sql As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    var_sql = "SELECT nom_tall" _
            & " FROM talleres where cod_ens = '" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "' and num_gra = " & IC_Nivel.Text
    objRS.Open var_sql, conn
    lst_existentes.Clear
    While Not objRS.EOF
        lst_existentes.AddItem objRS("nom_tall")
        objRS.MoveNext
    Wend
    objRS.Close
    asignadas
    'Mid(IC_Ensenanza.SelectedItem.Key, 2) & "' AND m.anno_mat=" & IC_Agno.SelectedItem.Text
End Sub

Private Sub IC_Nivel_Click()
     IC_Letra.Enabled = True
     Call Set_IC_Letra
     IC_Letra_Click
End Sub

Private Sub lst_Nombre_DblClick()
    Dim var_sql As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    var_sql = "select rut_prof,concat(ape1_prof,' ',ape2_prof,' ',noms_prof) as nombre" _
            & " From profesores" _
            & " where concat(ape1_prof,' ',ape2_prof,' ',noms_prof) = '" & lst_nombre.Text & "'"
    objRS.Open var_sql, conn
    While Not objRS.EOF
        txt_nombre.Text = objRS("nombre")
        txt_rut.Text = objRS("rut_prof")
        objRS.MoveNext
    Wend
    objRS.Close
    lst_nombre.Visible = False
'    If txt_rut.Text <> "" And txt_nombre.Text <> "" Then
'        IC_Ensenanza.Enabled = True
'        IC_Nivel.Enabled = True
'        IC_Letra.Enabled = True
'    End If
    Call Set_IC_Agno
    IC_Agno.Enabled = True
    IC_Ensenanza.Enabled = True
    IC_Nivel.Enabled = True
    If txt_rut.Text <> "" And txt_nombre.Text <> "" Then
        txt_rut.Enabled = False
        txt_nombre.Enabled = False
    End If
End Sub

Private Sub txt_nombre_Change()
    Dim var_sql As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    var_sql = "select concat(ape1_prof,' ',ape2_prof,' ',noms_prof) as nombre" _
            & " From profesores" _
            & " where concat(ape1_prof,' ',ape2_prof,' ',noms_prof) like '" & txt_nombre.Text & "%'"
    objRS.Open var_sql, conn
    lst_nombre.Visible = True
    lst_nombre.Clear
    While Not objRS.EOF
        lst_nombre.AddItem objRS("nombre")
        objRS.MoveNext
    Wend
    objRS.Close
End Sub

Private Sub Set_IC_Ensenanza()
    Dim REC As ADODB.Recordset
    Dim QRY As String
    
    QRY = "SELECT DISTINCT m.cod_ens, ce.des_ens FROM matriculas as m, codigos_ensenanza as ce WHERE m.cod_ens=ce.cod_ens AND m.anno_mat=" & IC_Agno.SelectedItem.Text & " ORDER BY ce.ord_ens;"
    Set REC = New ADODB.Recordset
    REC.Open QRY, conn
    
    IC_Ensenanza.ComboItems.Clear
    If REC.RecordCount > 0 Then
        REC.MoveFirst
        For i = 1 To REC.RecordCount
            IC_Ensenanza.ComboItems.Add i, "K" & Format(REC!Cod_Ens, "000"), REC!des_ens
            REC.MoveNext
        Next i
        Set IC_Ensenanza.SelectedItem = IC_Ensenanza.ComboItems.Item(1)
        ErrorStatus = False
        ' Llenar Siguiente Combo.
        IC_Nivel.Enabled = True
        IC_Letra.Enabled = False
        Call Set_IC_Nivel
    Else
        ErrorStatus = True
        IC_Ensenanza.Enabled = False
        IC_Nivel.Enabled = False
        IC_Letra.Enabled = False
    End If
    REC.Close
End Sub

Private Sub Set_IC_Nivel()
    Dim REC As ADODB.Recordset
    Dim QRY As String

    QRY = "SELECT DISTINCT m.num_gra FROM matriculas as m WHERE m.cod_ens='" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "' AND m.anno_mat=" & IC_Agno.SelectedItem.Text & " ORDER BY m.num_gra;"
    Set REC = New ADODB.Recordset
    REC.Open QRY, conn
    
    IC_Nivel.ComboItems.Clear
    If REC.RecordCount > 0 Then
        REC.MoveFirst
        For i = 1 To REC.RecordCount
            IC_Nivel.ComboItems.Add i, , str(REC!Num_Gra)
            REC.MoveNext
        Next i
        Set IC_Nivel.SelectedItem = IC_Nivel.ComboItems.Item(1)
        ErrorStatus = False
        ' Llenar Siguiente Combo.
        If Check_Letra.Value = 1 Then
            IC_Letra.Enabled = True
            Call Set_IC_Letra
        End If
    Else
        ErrorStatus = True
        IC_Nivel.Enabled = False
        IC_Letra.Enabled = False
    End If
    REC.Close
End Sub

Private Sub Set_IC_Letra()
    Dim REC As ADODB.Recordset
    Dim QRY As String
    
    'If Check_Letra.Value = 1 Then
        IC_Letra.ComboItems.Clear
        IC_Letra.Text = ""
        QRY = "SELECT DISTINCT m.let_cur FROM alu_x_cur as m WHERE m.cod_ens='" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "' AND m.agno=" & Trim(IC_Agno.SelectedItem.Text) & " AND m.num_gra='" & Trim(IC_Nivel.SelectedItem.Text) & "' ORDER BY m.num_gra;"
        Set REC = New ADODB.Recordset
        REC.Open QRY, conn
        If REC.RecordCount > 0 Then
            REC.MoveFirst
            For i = 1 To REC.RecordCount
                IC_Letra.ComboItems.Add i, , REC!Let_Cur
                REC.MoveNext
            Next i
            Set IC_Letra.SelectedItem = IC_Letra.ComboItems.Item(1)
            ErrorStatus = False
            ' Llenar Siguiente Combo.
        Else
            ErrorStatus = True
            Check_Letra.Value = 0
            IC_Letra.Enabled = False
        End If
        REC.Close
'    Else
'        ErrorStatus = False
'        IC_Letra.Enabled = False
'    End If
End Sub

Private Sub Set_IC_Agno()
    Dim agno As Integer
    
  '  agno = IIf(Year(Date) < 2005, 2005, Year(Date))
  '  IC_Agno.ComboItems.Clear
'    For i = 2005 To (Anno)
'        IC_Agno.ComboItems.Add i, , str(i + 2004)
'    Next i
'    Set IC_Agno.SelectedItem = IC_Agno.ComboItems.Item(i - 1)
'    ErrorStatus = False
    
    agno = IIf(Year(Date) < 2005, 2005, Year(Date))
    IC_Agno.ComboItems.Clear
    For i = 1 To (agno - 2004)
        IC_Agno.ComboItems.Add i, , str(i + 2004)
    Next i
    Set IC_Agno.SelectedItem = IC_Agno.ComboItems.Item(i - 1)
    ErrorStatus = False
    
    ' Llenar combo enseñanza
    'IC_Ensenanza.Enabled = True
    IC_Nivel.Enabled = False
    IC_Letra.Enabled = False
    Call Set_IC_Ensenanza
End Sub

Public Sub asignadas()
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    Dim var_sql As String
    var_sql = "select nom_tall" _
            & " from tall_x_cur_prof tp,talleres t" _
            & " where tp.cod_ens = '" & Mid(IC_Ensenanza.SelectedItem.Key, 2) & "'" _
            & " and tp.num_gra = " & IC_Nivel.Text _
            & " and let_cur = '" & IC_Letra.Text _
            & "' and agno = " & IC_Agno.Text _
            & " and tp.cod_tall = t.cod_tall and tp.num_gra = t.num_gra and tp.rut_prof = '" & txt_rut.Text & "'"
    objRS.Open var_sql, conn
    lst_asignadas.Clear
    While Not objRS.EOF
        lst_asignadas.AddItem objRS("nom_tall")
        objRS.MoveNext
    Wend
    objRS.Close
End Sub

Public Sub limpia()
    txt_rut.Enabled = True
    txt_nombre.Enabled = True
    txt_nombre.Text = ""
    txt_rut.Text = ""
    
'    IC_Agno.Enabled = True
'    IC_Ensenanza.Enabled = True
'    IC_Nivel.Enabled = True
'    IC_Letra.Enabled = True
    lst_nombre.Clear
    lst_nombre.Visible = False
    IC_Agno.ComboItems.Clear
    IC_Ensenanza.ComboItems.Clear
    IC_Nivel.ComboItems.Clear
    IC_Letra.ComboItems.Clear
    lst_existentes.Clear
    lst_asignadas.Clear
    
    IC_Agno.Enabled = False
    IC_Ensenanza.Enabled = False
    IC_Nivel.Enabled = False
    IC_Letra.Enabled = False

End Sub

Private Sub txt_nombre_KeyPress(KeyAscii As Integer)
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
