VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0"; "MSCOMCTL.OCX"
Begin VB.Form Form_correc 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   8265
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   13245
   Icon            =   "Form_correc.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   8265
   ScaleWidth      =   13245
   Begin VB.Frame Frame_Exim 
      Caption         =   "Proceso de Alumnos Eximidos"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   3855
      Left            =   6120
      TabIndex        =   57
      Top             =   3240
      Width           =   5775
      Begin VB.CommandButton btn_ace_exi 
         Caption         =   "Eximir Alumno"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   72
         Top             =   3240
         Width           =   1455
      End
      Begin VB.CommandButton btn_can_exi 
         Caption         =   "Cancelar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4080
         TabIndex        =   71
         Top             =   3240
         Width           =   1455
      End
      Begin VB.CommandButton btn_otro_exi 
         Caption         =   "Otro Alumno"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2280
         TabIndex        =   70
         Top             =   3240
         Width           =   1455
      End
      Begin VB.Frame Frame3 
         Height          =   2775
         Left            =   240
         TabIndex        =   58
         Top             =   240
         Width           =   5295
         Begin VB.ListBox lst_nom_exi 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   1530
            Left            =   1080
            TabIndex        =   59
            Top             =   480
            Width           =   3855
         End
         Begin VB.TextBox txt_motivo_exi 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   1080
            MaxLength       =   100
            TabIndex        =   76
            Top             =   2400
            Width           =   3855
         End
         Begin VB.ComboBox cmb_asi_exi 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   330
            Left            =   1080
            Style           =   2  'Dropdown List
            TabIndex        =   75
            Top             =   2040
            Width           =   3855
         End
         Begin VB.TextBox txt_estado_exi 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1080
            TabIndex        =   73
            Top             =   1680
            Width           =   2295
         End
         Begin VB.TextBox txt_anho_exi 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1080
            TabIndex        =   68
            Top             =   960
            Width           =   1095
         End
         Begin VB.TextBox txt_mod_exi 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1560
            TabIndex        =   64
            Top             =   1320
            Width           =   3375
         End
         Begin VB.TextBox txt_letra_exi 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1320
            TabIndex        =   63
            Top             =   1320
            Width           =   255
         End
         Begin VB.TextBox txt_nom_exi 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   1080
            TabIndex        =   62
            Top             =   240
            Width           =   3855
         End
         Begin VB.TextBox txt_nivel_exi 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1080
            TabIndex        =   61
            Top             =   1320
            Width           =   255
         End
         Begin VB.TextBox txt_rut_exi 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1080
            TabIndex        =   60
            Top             =   600
            Width           =   1455
         End
         Begin VB.Label Label18 
            Caption         =   "Motivo"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   78
            Top             =   2400
            Width           =   495
         End
         Begin VB.Label Label9 
            Caption         =   "Asignatura"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   77
            Top             =   2040
            Width           =   975
         End
         Begin VB.Label Label11 
            Caption         =   "Estado"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   74
            Top             =   1680
            Width           =   855
         End
         Begin VB.Label Label19 
            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            =   120
            TabIndex        =   69
            Top             =   960
            Width           =   855
         End
         Begin VB.Label Label7 
            Caption         =   "Curso"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   67
            Top             =   1320
            Width           =   495
         End
         Begin VB.Label Label6 
            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            =   120
            TabIndex        =   66
            Top             =   600
            Width           =   495
         End
         Begin VB.Label Label4 
            Caption         =   "Alumno"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   65
            Top             =   240
            Width           =   735
         End
      End
   End
   Begin VB.Frame Frame_Sit_prof 
      Caption         =   "Subsectores asignados a profesores"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   4815
      Left            =   120
      TabIndex        =   0
      Top             =   3240
      Visible         =   0   'False
      Width           =   5895
      Begin VB.ComboBox cmb_Agno 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1200
         TabIndex        =   79
         Top             =   480
         Width           =   975
      End
      Begin VB.Frame Frame_Estado 
         Caption         =   "Situación del docente"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   975
         Left            =   1320
         TabIndex        =   41
         Top             =   2520
         Width           =   2895
         Begin VB.ComboBox cmb_estado_asi 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   330
            Left            =   240
            TabIndex        =   10
            Top             =   360
            Width           =   2415
         End
      End
      Begin VB.CommandButton btn_grabar_sit_prof 
         Caption         =   "Grabar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2280
         TabIndex        =   8
         Top             =   4200
         Width           =   1215
      End
      Begin VB.ListBox lst_nom_sit_prof 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   690
         Left            =   1200
         TabIndex        =   2
         Top             =   1080
         Visible         =   0   'False
         Width           =   4095
      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            =   4560
         TabIndex        =   12
         Top             =   240
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.CommandButton btn_cerr_sit_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            =   4080
         TabIndex        =   9
         Top             =   4200
         Width           =   1215
      End
      Begin VB.CommandButton btn_lim_sit_prof 
         Caption         =   "Otro Profesor"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   7
         Top             =   4200
         Width           =   1215
      End
      Begin VB.ComboBox cmb_mod_asi_prof 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1200
         TabIndex        =   5
         Top             =   1680
         Width           =   2655
      End
      Begin VB.ComboBox cmb_numgra_sit_prof 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   4800
         TabIndex        =   6
         Top             =   1680
         Width           =   615
      End
      Begin VB.TextBox txt_nom_sit_prof 
         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        =   1
         Top             =   840
         Width           =   4095
      End
      Begin VB.TextBox txt_rut_sit_prof 
         Height          =   285
         Left            =   1200
         TabIndex        =   3
         Top             =   1320
         Width           =   1095
      End
      Begin VB.TextBox txt_dig_sit_prof 
         Height          =   285
         Left            =   2400
         TabIndex        =   4
         Top             =   1320
         Width           =   255
      End
      Begin MSFlexGridLib.MSFlexGrid grd_asig_impart 
         Height          =   2055
         Left            =   120
         TabIndex        =   11
         Top             =   2040
         Width           =   5655
         _ExtentX        =   9975
         _ExtentY        =   3625
         _Version        =   393216
         FixedCols       =   0
         BackColorSel    =   16761024
         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.Label Label20 
         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        =   80
         Top             =   480
         Width           =   975
      End
      Begin VB.Line Line1 
         X1              =   2280
         X2              =   2400
         Y1              =   1440
         Y2              =   1440
      End
      Begin VB.Label Label2 
         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        =   16
         Top             =   1680
         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            =   3960
         TabIndex        =   15
         Top             =   1680
         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        =   14
         Top             =   840
         Width           =   975
      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        =   13
         Top             =   1200
         Width           =   975
      End
   End
   Begin VB.Frame Frame_Edades 
      Caption         =   "Edades Reglamentarias"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   2775
      Left            =   7440
      TabIndex        =   42
      Top             =   120
      Width           =   5535
      Begin VB.CheckBox chk_todos_cursos 
         Caption         =   "Todos los cursos"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1440
         TabIndex        =   56
         Top             =   2160
         Width           =   1575
      End
      Begin VB.Frame Frame2 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Left            =   3720
         TabIndex        =   53
         Top             =   240
         Width           =   1575
         Begin VB.OptionButton opt_destino_reg 
            Caption         =   "Pantalla"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   120
            TabIndex        =   55
            Top             =   240
            Width           =   1095
         End
         Begin VB.OptionButton opt_destino_reg 
            Caption         =   "Impresora"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   120
            TabIndex        =   54
            Top             =   555
            Width           =   1335
         End
      End
      Begin VB.CommandButton btn_can_reg 
         Caption         =   "Cancelar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3720
         TabIndex        =   52
         Top             =   2040
         Width           =   1575
      End
      Begin VB.CommandButton btn_gen_reg 
         Caption         =   "Generar Informe"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3720
         TabIndex        =   51
         Top             =   1560
         Width           =   1575
      End
      Begin VB.ListBox lst_cursos_reg 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1260
         Left            =   120
         Style           =   1  'Checkbox
         TabIndex        =   44
         Top             =   1080
         Width           =   1095
      End
      Begin VB.ComboBox cmb_mod_reg 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   120
         TabIndex        =   43
         Top             =   480
         Width           =   3255
      End
      Begin MSComCtl2.DTPicker dtp_fecha_nac 
         Height          =   375
         Index           =   0
         Left            =   1440
         TabIndex        =   47
         Top             =   1080
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         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
         Format          =   52494337
         CurrentDate     =   37767
      End
      Begin MSComCtl2.DTPicker dtp_fecha_nac 
         Height          =   375
         Index           =   1
         Left            =   1440
         TabIndex        =   49
         Top             =   1680
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         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
         Format          =   52494337
         CurrentDate     =   37767
      End
      Begin VB.Line Line4 
         BorderColor     =   &H80000005&
         X1              =   3495
         X2              =   3495
         Y1              =   120
         Y2              =   2750
      End
      Begin VB.Line Line6 
         BorderColor     =   &H8000000C&
         X1              =   3480
         X2              =   3480
         Y1              =   120
         Y2              =   2750
      End
      Begin VB.Label Label3 
         Caption         =   "y el"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1440
         TabIndex        =   50
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "Nacidos entre el"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1440
         TabIndex        =   48
         Top             =   840
         Width           =   2055
      End
      Begin VB.Label Label10 
         Caption         =   "Tipo de Enseñanza"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   46
         Top             =   240
         Width           =   1575
      End
      Begin VB.Label Label8 
         Caption         =   "Niveles"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   45
         Top             =   840
         Width           =   615
      End
   End
   Begin VB.Frame Frame_correc 
      Caption         =   "Corrección de R.U.N"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   3015
      Left            =   120
      TabIndex        =   17
      Top             =   120
      Width           =   7215
      Begin VB.Frame Frame_individual 
         Height          =   2295
         Left            =   120
         TabIndex        =   24
         Top             =   240
         Width           =   5055
         Begin VB.ListBox lst_nom_alu 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   1530
            Left            =   960
            TabIndex        =   33
            Top             =   480
            Width           =   3855
         End
         Begin VB.TextBox txt_rut_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   960
            TabIndex        =   32
            Top             =   600
            Width           =   1455
         End
         Begin VB.TextBox txt_nivel_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   960
            TabIndex        =   31
            Top             =   960
            Width           =   255
         End
         Begin VB.CommandButton btn_otro_alu 
            Caption         =   "Otro Alumno"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   3360
            TabIndex        =   30
            Top             =   1680
            Width           =   1455
         End
         Begin VB.TextBox txt_apo_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   960
            TabIndex        =   29
            Top             =   1320
            Width           =   3855
         End
         Begin VB.TextBox txt_estado_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   960
            TabIndex        =   28
            Top             =   1680
            Width           =   2295
         End
         Begin VB.TextBox txt_nom_alu 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   960
            TabIndex        =   27
            Top             =   240
            Width           =   3855
         End
         Begin VB.TextBox txt_letra_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1200
            TabIndex        =   26
            Top             =   960
            Width           =   255
         End
         Begin VB.TextBox txt_mod_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   1440
            TabIndex        =   25
            Top             =   960
            Width           =   3375
         End
         Begin VB.Label Label12 
            Caption         =   "Alumno"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   38
            Top             =   240
            Width           =   735
         End
         Begin VB.Label Label13 
            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            =   120
            TabIndex        =   37
            Top             =   600
            Width           =   495
         End
         Begin VB.Label Label14 
            Caption         =   "Curso"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   36
            Top             =   960
            Width           =   495
         End
         Begin VB.Label Label15 
            Caption         =   "Apoderado"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   35
            Top             =   1320
            Width           =   855
         End
         Begin VB.Label Label17 
            Caption         =   "Estado"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   34
            Top             =   1680
            Width           =   855
         End
      End
      Begin VB.CommandButton Btn_Can_Correc 
         Caption         =   "Cancelar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5400
         TabIndex        =   40
         Top             =   2160
         Width           =   1455
      End
      Begin VB.Frame Frame_crit_correc 
         ForeColor       =   &H00FF0000&
         Height          =   1815
         Left            =   5280
         TabIndex        =   18
         Top             =   240
         Width           =   1695
         Begin VB.TextBox txT_new_dig 
            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       =   1
            TabIndex        =   22
            TabStop         =   0   'False
            Top             =   360
            Width           =   255
         End
         Begin VB.TextBox txt_new_rut 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   240
            MaxLength       =   9
            TabIndex        =   21
            TabStop         =   0   'False
            Top             =   360
            Width           =   855
         End
         Begin VB.CommandButton Btn_Ini_Correc 
            Caption         =   "Iniciar Correción"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   120
            TabIndex        =   20
            Top             =   1320
            Width           =   1455
         End
         Begin VB.CommandButton Btn_Limpiar_rut 
            Caption         =   "Limpiar Rut"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   120
            TabIndex        =   19
            Top             =   840
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   2  'Center
            Caption         =   "Nuevo Rut"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C00000&
            Height          =   255
            Left            =   120
            TabIndex        =   23
            Top             =   120
            Width           =   1455
         End
      End
      Begin MSComctlLib.ProgressBar Prgbar_correc_rut 
         Height          =   300
         Left            =   120
         TabIndex        =   39
         Top             =   2640
         Width           =   6975
         _ExtentX        =   12303
         _ExtentY        =   529
         _Version        =   393216
         Appearance      =   1
         Scrolling       =   1
      End
   End
End
Attribute VB_Name = "Form_correc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim aalumnos() As String, Aasi() As String
Dim Estados() As String, Fila As Integer
Dim Indasi As Integer
Sub IniciaGrilla()
Me.grd_asig_impart.Cols = 4
Me.grd_asig_impart.Rows = 2
Me.grd_asig_impart.FixedCols = 0
Me.grd_asig_impart.Clear
Me.grd_asig_impart.MergeCells = flexMergeRestrictRows
Me.grd_asig_impart.MergeRow(0) = True
Me.grd_asig_impart.FormatString = " Sector |       Asignatura impartida       |       Asignatura impartida       | Situación"
Me.grd_asig_impart.ColWidth(0) = 800
Me.grd_asig_impart.ColWidth(1) = 500
Me.grd_asig_impart.ColWidth(2) = 3000
Me.grd_asig_impart.ColWidth(3) = 800
End Sub
Sub CorrijeRut(tabla As String, Rutactual As String, Rutnuevo As String, NombreCampo As String)
    conn.Execute "update " & tabla & " set " & NombreCampo & " = '" & Rutnuevo & "' where " & NombreCampo & " ='" & Rutactual & "'"
    Call Log_AddAnotacion("Tabla.Campo " & tabla & "." & NombreCampo & " ", False)
End Sub

Function ExisteRutenBD(rut As String) As Boolean
' En esta función verificamos que el rut nuevo no se encuentra ya en alguna de estas tablas
ExisteRutenBD = False
'If ExistReg("alu_x_cur", "ci_alu = '" & rut & "'", conn) Or ExistReg("apo_x_alu", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("asistencia", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("enfermeria", "ci_alu = '" & rut & "'", conn) Or ExistReg("hermanos", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("matriculas", "ci_alu = '" & rut & "'", conn) Or ExistReg("matriculas_prox", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("notas", "ci_alu = '" & rut & "'", conn) Or ExistReg("obserbaciones", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("postulaciones", "ci_alu = '" & rut & "'", conn) Or ExistReg("postulantes", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("promedios", "ci_alu = '" & rut & "'", conn) Or ExistReg("repitentes", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("aux_men_apo_x_alu", "ci_alu = '" & rut & "'", conn) Or ExistReg("bol_apo_x_alu", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("boletas_auxiliar", "ci_alu = '" & rut & "'", conn) Or ExistReg("cuotas_x_alu", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("devoluciones", "ci_alu = '" & rut & "'", conn) Or ExistReg("pagos", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("aux_pagos", "ci_alu = '" & rut & "'", conn) Or ExistReg("aux_let_emi", "ci_alu = '" & rut & "'", conn) Or _
'   ExistReg("hist_alumno", "run_alu = '" & rut & "'", conn) Or ExistReg("acta_alumexi", "run_alu = '" & rut & "'", conn) Or _
'   ExistReg("acta_ant_aca", "run_alu = '" & rut & "'", conn) Or ExistReg("acta_nom_lic", "run_alu = '" & rut & "'", conn) Or _
'   ExistReg("acta_nomina", "run_alu = '" & rut & "'", conn) Or ExistReg("acta_sit_pro", "run_alu = '" & rut & "'", conn) Or _
'   ExistReg("becas", "run_alu = '" & rut & "'", conn) Then
'   ExisteRutenBD = True
'End If
End Function

Private Sub btn_ace_exi_Click()
If Trim(Me.txt_rut_exi) <> "" And Trim(Me.txt_anho_exi) <> "" And Trim(Me.cmb_asi_exi.Text) <> "" Then
    If Trim(Aasi(Indasi)) = "13" Then
        conn.Execute "replace into acta_alumexi (run_alu, agno, cod_asi, razon_exim) values ('" & Me.txt_rut_exi & "','" & Me.txt_anho_exi & "','" & Aasi(Indasi) & "','" & Me.txt_motivo_exi & "')"
        MsgBox ("Proceso realizado")
    Else
        If Trim(Me.txt_motivo_exi) <> "" Then
            conn.Execute "replace into acta_alumexi (run_alu, agno, cod_asi, razon_exim) values ('" & Me.txt_rut_exi & "','" & Me.txt_anho_exi & "','" & Aasi(Indasi) & "','" & Me.txt_motivo_exi & "')"
            MsgBox ("Proceso realizado")
        Else
            MsgBox ("Falta motivo del proceso")
            Me.txt_motivo_exi.SetFocus
        End If
    End If
Else
    MsgBox ("Faltan Campos por llenar")
End If
End Sub

Private Sub Btn_Can_Correc_Click()
Unload Me
End Sub

Private Sub btn_can_rank_Click()
Unload Me
End Sub

Private Sub btn_can_exi_Click()
Unload Me
End Sub

Private Sub btn_can_reg_Click()
Unload Me
End Sub

Private Sub btn_carga_asignaturas_Click()
CodModalidad = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.cmb_mod_asi_prof.Text & "'", conn)
Ngrado = Me.cmb_numgra_sit_prof.Text
Call IniciaGrilla
'rs.Open "select s.nom_asi from asi_x_cur_prof a, subsectores s where , conn"
rs.Open " select distinct rut_prof, cod_sec, cod_asi, cod_ens, num_gra FROM asi_x_cur_prof where rut_prof = '" & Me.txt_rut_sit_prof & "-" & Me.txt_dig_sit_prof & "' and num_gra ='" & Ngrado & "' and agno = " & cmb_agno.Text
If rs.RecordCount > 0 Then
    While Not rs.EOF
        RutProfe = rs("rut_prof")
        Codsec = rs("cod_sec")
        Codasig = rs("cod_asi")
        Codens = rs("cod_ens")
        NumGra = rs("num_gra")
        
        If Not ExistReg("sitprof_x_asi", "rut_prof = '" & RutProfe & "' and  cod_sec = '" & Codsec & "' and cod_asi = '" & Codasig & "' and cod_ens ='" & Codens & "' and num_gra ='" & NumGra & "' and agno = " & cmb_agno.Text, conn) Then
        'conn.Execute "INSERT INTO REG_OPE(aut_nombre_usuario, FEC_OPE, HOR_OPE, COD_OPE, DES_OPE, PC_IP, PC_NOM) values('" & RutGlobal & "', '" & InvierteFecha(Date, "R") & "', '" & Time & "', '" & CodOpe & "', '" & DesOpe & "', '" & PC_IP & "', '" & PC_Nom & "')"
            conn.Execute "insert into sitprof_x_asi (rut_prof, cod_sec, cod_asi, cod_ens, num_gra, cod_sit_prof,agno) values ('" & RutProfe & "','" & Codsec & "','" & Codasig & "','" & Codens & "','" & NumGra & "' , 'TIT'," & cmb_agno.Text & ")"
        'Else
        '    conn.Execute "update sit_prof_x_asi"
        End If
        rs.MoveNext
    Wend
    Call LlenaGrilla(Me.grd_asig_impart, "Sector , Subsector impartido ,Subsector impartido , Situación", "sitprof_x_asi sit, subsectores sub", "sit.cod_sec; sit.cod_asi; sub.nom_asi; sit.cod_sit_prof", "sub.cod_sec = sit.cod_sec and sub.cod_asi=sit.cod_asi and sub.cod_ens=sit.cod_ens and sub.num_gra=sit.num_gra and sit.cod_ens = '" & CodModalidad & "' and sit.num_gra = '" & Ngrado & "' and sit.rut_prof = '" & Me.txt_rut_sit_prof & "-" & Me.txt_dig_sit_prof & "' and sit.agno = " & cmb_agno.Text, conn)
    Me.grd_asig_impart.ColWidth(0) = 800
    Me.grd_asig_impart.ColWidth(1) = 500
    Me.grd_asig_impart.ColWidth(2) = 3000
    Me.grd_asig_impart.ColWidth(3) = 800
    Me.btn_grabar_sit_prof.Enabled = True
Else
    Me.btn_grabar_sit_prof.Enabled = False
End If
rs.Close

End Sub

Private Sub btn_cerr_sit_prof_Click()
Unload Me
End Sub

Private Sub btn_gen_rep_rank_Click()

End Sub

Private Sub btn_gen_reg_Click()
Dim Ngrado As String
Dim letra As String
Dim SelCursos As String
Dim modalidad As String
Dim Con As Integer
Con = 0
SelCursos = ""
If Me.lst_cursos_reg.SelCount > 0 And Me.cmb_mod_reg.Text <> "" And Me.dtp_fecha_nac(1).Value >= Me.dtp_fecha_nac(0).Value Then
    
    modalidad = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.cmb_mod_reg.Text & "'", conn)
    For t = 0 To Me.lst_cursos_reg.ListCount - 1
        If Me.lst_cursos_reg.Selected(t) Then
            Con = t
        End If
    Next t
    For t = 0 To Me.lst_cursos_reg.ListCount - 1
        If Me.lst_cursos_reg.Selected(t) Then
            Ngrado = Anuevocurso(t, 1)
            letra = Anuevocurso(t, 2)
            If t = Con Then
                SelCursos = SelCursos & "({alu_x_cur.num_gra}  = '" & Ngrado & "' and {alu_x_cur.let_cur} = '" & letra & "' and {alu_x_cur.cod_ens} ='" & modalidad & "')"
            Else
                SelCursos = SelCursos & "({alu_x_cur.num_gra}  = '" & Ngrado & "' and {alu_x_cur.let_cur} = '" & letra & "' and {alu_x_cur.cod_ens} ='" & modalidad & "') or "
            End If
        End If
    Next
    ' and {alu_x_cur.agno} = " & Anno & ")" & "
    
    fecha1 = InvierteFecha(Me.dtp_fecha_nac(0).Value, "R")
    fechaini = Year(fecha1) & "," & Month(fecha1) & "," & Day(fecha1)
    fecha2 = InvierteFecha(Me.dtp_fecha_nac(1).Value, "R")
    fechafin = Year(fecha2) & "," & Month(fecha2) & "," & Day(fecha2)
    a = "{postulantes.FEC_NACALU}  >= '" & Format(fechaini, "yyyy-mm-dd") & "' and {postulantes.FEC_NACALU} <= '" & Format(fechafin, "yyyy-mm-dd") & "'"
    SelCursos = "(" & SelCursos & ") and (" & a & ") and ({alu_x_cur.agno} = " & Anno & ")"
       
    titulo = "NÓMINA DE ALUMNOS POR RANGO DE EDADES"
    rs.CursorLocation = adUseClient
    rs.Open "select nom_est, dir_est, localidad_est from establecimientos", conn
    If rs.RecordCount > 0 Then
        Nombrecol = rs("Nom_est")
        Direccol = rs("Dir_est")
        ComunaCol = rs("Localidad_est")
    End If
    rs.Close
    Form_main.CrystalReport.WindowTitle = titulo
    Form_main.CrystalReport.Formulas(0) = "nombrecolegio = '" & Nombrecol & "'"
    Form_main.CrystalReport.Formulas(1) = "direccioncolegio = '" & Direccol & "'"
    Form_main.CrystalReport.Formulas(2) = "comunacolegio = '" & ComunaCol & "'"
    Form_main.CrystalReport.Formulas(3) = "titulo= '" & titulo & "'"
    Form_main.CrystalReport.Formulas(4) = "hora = '" & Time & "'"
    Form_main.CrystalReport.Formulas(5) = "anhoescolar = '" & Anno & "'"
    Form_main.CrystalReport.Formulas(6) = "desde = '" & Me.dtp_fecha_nac(0).Value & "'"
    Form_main.CrystalReport.Formulas(7) = "hasta = '" & Me.dtp_fecha_nac(1).Value & "'"
    Form_main.CrystalReport.ReportFileName = DirAplicacion & "\rpt\Edades.rpt"
    Form_main.CrystalReport.ReplaceSelectionFormula ("")
    
    Form_main.CrystalReport.ReplaceSelectionFormula (SelCursos)
    Form_main.CrystalReport.WindowState = crptMaximized
    Form_main.CrystalReport.Action = 1
    Form_main.CrystalReport.ReplaceSelectionFormula ("")
    Call LimpiaFormulas(Form_main.CrystalReport, 30)
Else
    MsgBox ("Faltan opciones por seleccionar o error en las fechas de nacimiento")
End If
End Sub

Private Sub btn_grabar_sit_prof_Click()
Dim RutProfe As String
If Me.txt_rut_sit_prof.Text <> "" And Me.txt_dig_sit_prof.Text <> "" And Me.cmb_mod_asi_prof.Text <> "" And Me.cmb_numgra_sit_prof.Text <> "" Then
    RutProfe = Me.txt_rut_sit_prof.Text & "-" & Me.txt_dig_sit_prof.Text
    Ngrado = Me.cmb_numgra_sit_prof.Text
    Codens = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens ='" & Me.cmb_mod_asi_prof.Text & "'", conn)
    Form_Progress.Label1.Caption = "Grabando ..."
    Form_Progress.Show
    Abarra = Me.grd_asig_impart.Rows - 1
    Form_Progress.ProgBar1.MaxValue = Abarra
    Abarra = 1
    For t = 1 To Me.grd_asig_impart.Rows - 1
        Codsec = Me.grd_asig_impart.TextMatrix(t, 0)
        Codasig = Me.grd_asig_impart.TextMatrix(t, 1)
        codsit = Me.grd_asig_impart.TextMatrix(t, 3)
        conn.Execute "update sitprof_x_asi set cod_sit_prof ='" & codsit & "' where cod_sec='" & Codsec & "' and cod_asi ='" & Codasig & "' and cod_ens ='" & Codens & "' and num_gra ='" & Ngrado & "' and rut_prof ='" & RutProfe & "' and agno = " & cmb_agno.Text
        Abarra = Abarra + 1
        Form_Progress.ProgBar1.ShowProgress Abarra
        Form_Progress.SetFocus
        DoEvents
    Next
    Form_Progress.ProgBar1.ShowProgress 0
    Unload Form_Progress
Else
    MsgBox ("Faltan opciones por seleccionar")
End If
End Sub

Private Sub Btn_Ini_Correc_Click()
Dim log As Boolean
On Error GoTo controlerr
Dim Rutactual As String, Rutnuevo As String
Dim accion_realizada As String
Rutactual = Me.txt_rut_alu.Text
Rutnuevo = Me.txt_new_rut & "-" & UCase(Me.txT_new_dig.Text)
If Me.txt_new_rut.Text <> "" And Me.txT_new_dig <> "" Then
    If UCase(txT_new_dig.Text) = UCase(digito(txt_new_rut.Text)) Then
        If Not ExisteRutenBD(Rutnuevo) Then
            If MsgBox("¿Está seguro(a)?", vbYesNo + vbQuestion) = vbYes Then
                Call Log_AddAnotacion("Correción de Run Alumno en Tablas.- Reemplazar el Rut -> " & Rutactual & " por -> " & Rutnuevo, True)
                'conn.BeginTrans
                avance = 100 / 50
                Me.Prgbar_correc_rut.Max = 100
            '   ***Tabla, Rutactual, Rutnuevo
                Me.Prgbar_correc_rut.Value = 0
                Call CorrijeRut("alu_x_cur", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("apo_x_alu", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("asistencia", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("enfermeria", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("hermanos", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("matriculas", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("matriculas_prox", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("notas", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("obserbaciones", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("postulaciones", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("postulantes", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("promedios", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("repitentes", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                
                Call CorrijeRut("aux_men_apo_x_alu", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("bol_apo_x_alu", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("boletas_auxiliar", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("cuotas_x_alu", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("devoluciones", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("pagos", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("aux_pagos", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("aux_let_emi", Rutactual, Rutnuevo, "Ci_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                
                Call CorrijeRut("hist_alumno", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("hist_apo_alu", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("acta_alumexi", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("acta_ant_aca", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("acta_nom_lic", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("acta_nomina", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("acta_sit_pro", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("becas", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                
                Call CorrijeRut("fnza_detalle_mensualidad", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                Call CorrijeRut("fnza_boletas", Rutactual, Rutnuevo, "Run_alu"): Me.Prgbar_correc_rut.Value = Me.Prgbar_correc_rut.Value + avance
                
                Me.Prgbar_correc_rut.Value = 100
                Me.txt_rut_alu.Text = Rutnuevo
                
                'Insertar log cambio de rut alumno
                accion_realizada = "El alumno a cambiado rut de " & CStr(CStr(Rutactual)) & " a " & CStr(CStr(Rutnuevo))
                log = Inserta_Vitacora_Alumno(CStr(CStr(Rutactual)), accion_realizada)
                accion_realizada = "El alumno tenía anteriormente el rut " & CStr(CStr(Rutactual))
                log = Inserta_Vitacora_Alumno(CStr(CStr(Rutnuevo)), accion_realizada)
                
                'Fin log
                
                MsgBox ("Proceso Ok")
                Me.Prgbar_correc_rut.Value = 0
                Me.btn_otro_alu.SetFocus
                
            Else
                Call Btn_Limpiar_rut_Click
            End If
        Else
            Call Log_AddAnotacion("Correción de Run .- No fue posible reemplazar el rut -> " & Rutactual & " por -> " & Rutnuevo & " Rut existe en el sistema.", True)
            MsgBox "Rut existe en la Base de datos", vbCritical, "RUT YA EXISTE"
            Me.txt_new_rut.SetFocus
            SendKeys "{home}+{end}"
        End If
    Else
        MsgBox ("Digito verificador erróneo")
        Me.txT_new_dig.SetFocus
        SendKeys "{home}+{end}"
    End If
Else
    MsgBox ("Complete rut nuevo")
End If

Exit Sub
controlerr:
If Err.Number = -2147217865 Then
    MsgBox ("Tabla no existe en base de datos, presione aceptar para continuar.")
    Resume Next
Else
    MsgBox (Err.Description & " " & Err.Number)
    'conn.RollbackTrans
End If
End Sub

Private Sub btn_lim_sit_prof_Click()
    Busqueda = 0
    Me.txt_nom_sit_prof.Locked = False
    Me.txt_nom_sit_prof.Text = ""
    Me.lst_nom_sit_prof.Clear
    Me.lst_nom_sit_prof.Visible = False
    Me.txt_rut_sit_prof.Text = ""
    Me.txt_dig_sit_prof.Text = ""
    Me.txt_rut_sit_prof.Enabled = False
    Me.txt_dig_sit_prof.Enabled = False
    Me.btn_grabar_sit_prof.Enabled = False
    Me.cmb_mod_asi_prof.Clear
    Me.cmb_numgra_sit_prof.Clear
    cmb_agno.Enabled = True
    Call IniciaGrilla
    Call LlenaCombo(cmb_mod_asi_prof, "codigos_ensenanza", "des_ens", "order by ord_ens", conn)
    Me.cmb_mod_asi_prof.Enabled = False
    Me.cmb_numgra_sit_prof.Enabled = False
    Busqueda = 1
    Me.txt_nom_sit_prof.SetFocus
End Sub

Private Sub Btn_Limpiar_rut_Click()
Me.txt_new_rut.Text = ""
Me.txT_new_dig.Text = ""
Me.txt_new_rut.SetFocus
End Sub

Private Sub btn_otro_alu_Click()
Call Btn_Limpiar_rut_Click
Me.Frame_crit_correc.Enabled = False
Me.txt_nom_alu.Text = ""
Me.txt_rut_alu.Text = ""
Me.txt_nivel_alu.Text = ""
Me.txt_letra_alu.Text = ""
Me.txt_mod_alu.Text = ""
Me.txt_apo_alu.Text = ""
Me.txt_estado_alu.Text = ""
Me.txt_nom_alu.Enabled = True
Me.txt_nom_alu.SetFocus
Me.btn_otro_alu.Enabled = False
Busqueda = 1
End Sub



Private Sub btn_otro_exi_Click()
Me.Frame_Exim.Enabled = True
Me.txt_nom_exi.Text = ""
Me.txt_rut_exi.Text = ""
Me.txt_anho_exi = ""
Me.txt_nivel_exi.Text = ""
Me.txt_letra_exi.Text = ""
Me.txt_mod_exi.Text = ""
Me.txt_estado_exi.Text = ""
Me.txt_nom_exi.Enabled = True
Me.txt_nom_exi.SetFocus
Me.btn_otro_exi.Enabled = False
Me.cmb_asi_exi.Clear
Me.txt_motivo_exi = ""
Busqueda = 1
End Sub

Private Sub chk_todos_cursos_Click()
If Me.chk_todos_cursos.Value Then
    For t = 0 To Me.lst_cursos_reg.ListCount - 1
        Me.lst_cursos_reg.Selected(t) = True
    Next t
Else
    For t = 0 To Me.lst_cursos_reg.ListCount - 1
        Me.lst_cursos_reg.Selected(t) = False
        Me.lst_cursos_reg.ListIndex = 0
    Next t
End If
End Sub

Private Sub cmb_asi_exi_Click()
Indasi = Me.cmb_asi_exi.ListIndex
Me.txt_motivo_exi = DevuelveCampo("acta_alumexi", "", "razon_exim", "run_alu ='" & Trim(Me.txt_rut_exi) & "' and agno ='" & Trim(Me.txt_anho_exi) & "' and cod_asi ='" & Aasi(Indasi) & "'", conn)
End Sub

Private Sub cmb_estado_asi_Click()
Me.grd_asig_impart.TextMatrix(Fila, 3) = DevuelveCampo("sit_prof", "", "cod_sit_prof", "des_sit_prof = '" & Me.cmb_estado_asi.Text & "'", conn)
Me.frame_estado.Visible = False
Me.btn_lim_sit_prof.Enabled = True
Me.btn_grabar_sit_prof.Enabled = True
End Sub

Private Sub cmb_mod_asi_prof_Click()
Dim RutProfe As String
RutProfe = Me.txt_rut_sit_prof.Text & "-" & Me.txt_dig_sit_prof.Text
Me.cmb_numgra_sit_prof.Clear
Busqueda = 1
If Len(Me.cmb_mod_asi_prof.Text) <> 0 Then
    Codens = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = " & "'" & Me.cmb_mod_asi_prof.Text & "'", conn)
    Me.cmb_numgra_sit_prof.Enabled = True
    Me.cmb_numgra_sit_prof.Clear
    Call LlenaCombo(Me.cmb_numgra_sit_prof, "asi_x_cur_prof", "distinct num_gra", "where cod_ens='" & Codens & "' and rut_prof ='" & RutProfe & "'", conn)
 
 'For t = 1 To Val(Nivel)
 '   Me.cmb_numgra_sit_prof.AddItem t
 'Next t
End If
End Sub

Private Sub cmb_mod_asi_prof_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_mod_asi_prof.Text) <> 0 Then
    Me.cmb_numgra_sit_prof.Enabled = True
    Me.cmb_numgra_sit_prof.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_mod_reg_Click()
modalidad = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.cmb_mod_reg.Text & "'", conn)
rs.CursorLocation = adUseClient
rs.Open "SELECT num_gra, let_cur FROM CURSOS where cod_ens ='" & modalidad & "' AND agno=" & Anno & " ORDER BY NUM_GRA,let_cur", conn
If rs.RecordCount > 0 Then
    ReDim Anuevocurso(rs.RecordCount, 2)
    Me.lst_cursos_reg.Clear
    Me.chk_todos_cursos.Value = 0
    c = 0
    While Not rs.EOF
        lst_cursos_reg.AddItem rs("num_gra") + " " + rs("LET_CUR")
        Anuevocurso(c, 1) = rs("num_gra")
        Anuevocurso(c, 2) = rs("let_cur")
        rs.MoveNext
        c = c + 1
    Wend
    End If
rs.Close
End Sub

Private Sub cmb_mod_reg_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub

Private Sub cmb_numgra_sit_prof_Click()
CodModalidad = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.cmb_mod_asi_prof.Text & "'", conn)
Ngrado = Me.cmb_numgra_sit_prof.Text
btn_carga_asignaturas_Click
End Sub

Private Sub cmb_numgra_sit_prof_KeyPress(KeyAscii As Integer)
'If KeyAscii = 13 And Len(Me.cmb_numgra_sit_prof.Text) <> 0 Then
'    Me.cmb_let_cur_asi_prof.Enabled = True
'    Me.cmb_let_cur_asi_prof.SetFocus
'End If
KeyAscii = 0
End Sub

Private Sub Command1_Click()

End Sub

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

Private Sub Form_Load()
Set rs = New ADODB.Recordset
Set RsAux = New ADODB.Recordset
If MenuCorrec = "crun" Then
    Call Form_main.Hideframe3
    Me.KeyPreview = True
    Me.Frame_correc.Visible = True
    Me.Height = 3700
    Me.Width = 7530
    Me.Frame_correc.Top = 120
    Me.Frame_correc.Left = 129
    Me.Frame_correc.Visible = True
    Form_correc.lst_nom_alu.Visible = False
    Me.Frame_crit_correc.Enabled = False
    CentrarForma Me
    Me.Show
    Busqueda = 1
ElseIf MenuCorrec = "exim" Then
    Call Form_main.Hideframe3
    Me.KeyPreview = True
    Me.Frame_Exim.Visible = True
    Me.Height = 4400
    Me.Width = 6100
    Me.Frame_Exim.Top = 30
    Me.Frame_Exim.Left = 120
    Me.Frame_Exim.Visible = True
    Me.lst_nom_exi.Visible = False
    Me.Frame_Exim.Enabled = True
    CentrarForma Me
    Me.Show
    Busqueda = 1
ElseIf MenuCorrec = "sitprof" Then
    Me.Caption = "Subsectores asignados a profesor"
    Call Form_main.Hideframe3
    Me.KeyPreview = True
    cmb_agno.AddItem Anno
    cmb_agno.AddItem Anno + 1
    cmb_agno.Text = Anno
    Me.Height = 5450
    Me.Width = 6210
    Me.Frame_Sit_prof.Top = 120
    Me.Frame_Sit_prof.Left = 129
    Me.Frame_Sit_prof.Visible = True
    Me.lst_nom_sit_prof.Visible = False
    Me.txt_rut_sit_prof.Enabled = False
    Me.txt_dig_sit_prof.Enabled = False
    Me.cmb_mod_asi_prof.Clear
    Me.cmb_numgra_sit_prof.Clear
    'Call llenacombo(cmb_mod_asi_prof, "codigos_ensenanza", "des_ens", "order by ord_ens")
    Me.cmb_mod_asi_prof.Enabled = False
    Me.cmb_numgra_sit_prof.Enabled = False
    Me.btn_grabar_sit_prof.Enabled = False
    Me.grd_asig_impart.Cols = 4
    Me.grd_asig_impart.Rows = 2
    Me.grd_asig_impart.FixedCols = 0
    Me.grd_asig_impart.Clear
    Me.grd_asig_impart.MergeCells = flexMergeRestrictRows
    Me.grd_asig_impart.MergeRow(0) = True
    Me.grd_asig_impart.FormatString = " Sector |       Asignatura impartida       |       Asignatura impartida       | Situación"
    Me.grd_asig_impart.ColWidth(0) = 800
    Me.grd_asig_impart.ColWidth(1) = 500
    Me.grd_asig_impart.ColWidth(2) = 3000
    Me.grd_asig_impart.ColWidth(3) = 800
    Me.frame_estado.Visible = False
    CentrarForma Me
    Me.Show
    Busqueda = 1
ElseIf MenuCorrec = "edades" Then
    Call Form_main.Hideframe3
    Me.KeyPreview = True
    Me.Frame_Edades.Visible = True
    Me.Height = 3400
    Me.Width = 5900
    Me.Frame_Edades.Top = 120
    Me.Frame_Edades.Left = 129
    Call LlenaCombo(cmb_mod_reg, "codigos_ensenanza", "des_ens", "order by ord_ens", conn)
    Me.dtp_fecha_nac(0).Value = "01-01-" & val(Anno) - 7
    Me.dtp_fecha_nac(1).Value = "31-12-" & val(Anno) - 7
    Me.opt_destino_reg(0).Value = True
    CentrarForma Me
    Me.Show
'    busqueda = 1
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
Call menuhabilitado(True)
End Sub

Private Sub grd_asig_impart_Click()
If Me.grd_asig_impart.Col = 3 Then
    Fila = Me.grd_asig_impart.Row
    Me.cmb_estado_asi.Clear
    Call LlenaCombo(Me.cmb_estado_asi, "sit_prof", "des_sit_prof", "", conn)
    Me.btn_lim_sit_prof.Enabled = False
    Me.btn_grabar_sit_prof.Enabled = False
    Me.frame_estado.Visible = True
End If
End Sub

Private Sub lst_niveles_reg_Click()

End Sub

Private Sub lst_nom_alu_DblClick()
Dim rutalumno As String
Dim CodModalidad, NumGra As String
Indi = 0
Busqueda = 0
Busqueapo = 0
Me.lst_nom_alu.Visible = False
rutalumno = aalumnos(lst_nom_alu.ListIndex, 1)
Nombrealumno = aalumnos(lst_nom_alu.ListIndex, 2)
RutApo = DevuelveCampo("apo_x_alu", "", "rut_apo", "ci_alu ='" & rutalumno & "'", conn)
nombreapo = DevuelveCampo("apoderados", "", "noms_apo", "rut_apo ='" & RutApo & "'", conn)
ape1apo = DevuelveCampo("apoderados", "", "ape1_apo", "rut_apo ='" & RutApo & "'", conn)
ape2apo = DevuelveCampo("apoderados", "", "ape2_apo", "rut_apo ='" & RutApo & "'", conn)
Me.btn_otro_alu.Enabled = True
Me.txt_nom_alu.Enabled = False
RsAux.CursorLocation = adUseClient
If ExistReg("alu_x_cur", "ci_alu = '" & rutalumno & "' and ucase(activo_alu)='SI'", conn) Then
    RsAux.Open "select ci_alu, cod_ens, num_gra, let_cur from alu_x_cur where ci_alu = '" & rutalumno & "' and agno=" & Anno & " and ucase(activo_alu)='SI'", conn
    Me.txt_nom_alu.Text = Nombrealumno
    Me.txt_rut_alu.Text = RsAux("ci_alu")
    Me.txt_nivel_alu.Text = RsAux("num_gra")
    Me.txt_letra_alu.Text = RsAux("let_cur")
    Me.txt_mod_alu.Text = DevuelveCampo("codigos_ensenanza", "", "Des_ens", "cod_ens = '" & RsAux("cod_ens") & "'", conn)
    Me.txt_apo_alu.Text = nombreapo & " " & ape1apo & " " & ape2apo
    Me.txt_estado_alu.Text = "ACTIVO"
    RsAux.Close
Else
    RsAux.Open "select ci_alu, cod_ens, num_gra, let_cur from alu_x_cur where ci_alu = '" & rutalumno & "' and agno=" & Anno & " and ucase(activo_alu)='NO' and fec_cam ='1111-11-11'", conn
    If RsAux.RecordCount > 0 Then
        Me.txt_nom_alu.Text = Nombrealumno
        Me.txt_rut_alu.Text = RsAux("ci_alu")
        Me.txt_nivel_alu.Text = RsAux("num_gra")
        Me.txt_letra_alu.Text = RsAux("let_cur")
        Me.txt_mod_alu.Text = DevuelveCampo("codigos_ensenanza", "", "Des_ens", "cod_ens = '" & RsAux("cod_ens") & "'", conn)
        Me.txt_apo_alu.Text = nombreapo & " " & ape1apo & " " & ape2apo
        Me.txt_estado_alu.Text = "RETIRADO"
    End If
    RsAux.Close
End If
    'AQUI VAN LOS DATOS DEL APODERADO //2
Me.Frame_crit_correc.Enabled = True
Me.txt_new_rut.SetFocus
End Sub

Private Sub Text3_Change()

End Sub

Private Sub lst_nom_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 Call lst_nom_alu_DblClick
End If
End Sub

Private Sub lst_nom_exi_DblClick()
Dim rutalumno As String
Dim CodModalidad, NumGra As String
Indi = 0
Busqueda = 0
Busqueapo = 0
Me.lst_nom_exi.Visible = False
rutalumno = aalumnos(lst_nom_exi.ListIndex, 1)
Nombrealumno = aalumnos(lst_nom_exi.ListIndex, 2)
Me.btn_otro_exi.Enabled = True
Me.txt_nom_exi.Enabled = False
RsAux.CursorLocation = adUseClient
If ExistReg("alu_x_cur", "ci_alu = '" & rutalumno & "' and ucase(activo_alu)='SI' and agno = " & Anno, conn) Then
    RsAux.Open "select ci_alu, cod_ens, num_gra, let_cur from alu_x_cur where ci_alu = '" & rutalumno & "' and ucase(activo_alu)='SI' and agno = " & Anno, conn
    Me.txt_nom_exi.Text = Nombrealumno
    Me.txt_rut_exi.Text = RsAux("ci_alu")
    Me.txt_nivel_exi.Text = RsAux("num_gra")
    Me.txt_letra_exi.Text = RsAux("let_cur")
    Me.txt_mod_exi.Text = DevuelveCampo("codigos_ensenanza", "", "Des_ens", "cod_ens = '" & RsAux("cod_ens") & "'", conn)
    Me.txt_anho_exi = Anno
    Me.txt_estado_exi.Text = "ACTIVO"
    Call llenacomboconarreglo(Me.cmb_asi_exi, "asi_x_cur_prof a, subsectores s where a.cod_ens=s.cod_ens and a.num_gra=s.num_gra and a.cod_asi=s.cod_asi and a.cod_sec=s.cod_sec and s.ord_asi <> 0 and a.cod_ens='" & RsAux!Cod_Ens & "' and a.num_gra='" & RsAux!Num_Gra & "' and a.let_cur='" & RsAux!Let_Cur & "' and a.agno = " & Anno & " order by s.ord_asi", "s.nom_asi", "s.cod_asi", Aasi, conn)
    RsAux.Close
Else
    RsAux.Open "select ci_alu, cod_ens, num_gra, let_cur from alu_x_cur where ci_alu = '" & rutalumno & "' and ucase(activo_alu)='NO' and fec_cam ='1111-11-11'", conn
    If RsAux.RecordCount > 0 Then
        Me.txt_nom_exi.Text = Nombrealumno
        Me.txt_rut_exi.Text = RsAux("ci_alu")
        Me.txt_nivel_exi.Text = RsAux("num_gra")
        Me.txt_letra_exi.Text = RsAux("let_cur")
        Me.txt_mod_exi.Text = DevuelveCampo("codigos_ensenanza", "", "Des_ens", "cod_ens = '" & RsAux("cod_ens") & "'", conn)
        Me.txt_estado_exi.Text = "RETIRADO"
    End If
    RsAux.Close
End If
    'AQUI VAN LOS DATOS DEL APODERADO //2
Me.Frame_Exim.Enabled = True
End Sub

Private Sub lst_nom_sit_prof_DblClick()
Dim rutprof As String
Indi = 0
Busqueda = 0
RutProfe = aprofesores(lst_nom_sit_prof.ListIndex)
a = "SELECT * FROM profesores where rut_prof = " & "'" & RutProfe & "'"
rs.CursorLocation = adUseClient
rs.Open a, conn
If rs.RecordCount > 0 Then
    apellido_p = rs("ape1_prof")
    apellido_m = rs("ape2_prof")
    nombres = rs("noms_prof")
    rutprof = rs("rut_prof")
    rs.Close
    Me.txt_nom_sit_prof.Text = nombres + " " + apellido_p + " " + apellido_m
    Me.txt_rut_sit_prof.Text = separarut(rutprof)
    Me.txt_dig_sit_prof.Text = separadigito(rutprof)
    Me.lst_nom_sit_prof.Visible = False
    Me.txt_nom_sit_prof.Locked = True
    Me.txt_rut_sit_prof.Enabled = False
    Me.txt_dig_sit_prof.Enabled = False
    Me.cmb_mod_asi_prof.Enabled = True
    Me.cmb_mod_asi_prof.SetFocus
    SendKeys "{home}"
    Me.cmb_mod_asi_prof.Clear
    cmb_agno.Enabled = False
    Call LlenaCombo(Me.cmb_mod_asi_prof, "asi_x_cur_prof a, codigos_ensenanza c", "distinct c.des_ens", "where c.cod_ens = a.cod_ens and a.rut_prof='" & rutprof & "' and agno = " & cmb_agno.Text, conn)
End If
End Sub

Private Sub lst_nom_sit_prof_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 Call lst_nom_sit_prof_DblClick
End If
End Sub

Private Sub opt_destino_rank_Click(Index As Integer)

End Sub

Private Sub opt_destino_reg_Click(Index As Integer)
If Index = 0 Then
    Form_main.CrystalReport.Destination = crptToWindow
Else
    Form_main.CrystalReport.Destination = crptToPrinter
End If
End Sub

Private Sub txT_new_dig_KeyPress(KeyAscii As Integer)
If (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
If Chr(KeyAscii) = "K" Or Chr(KeyAscii) = "k" Then Exit Sub
If KeyAscii = 8 Then Exit Sub
If KeyAscii = 32 Then Exit Sub
If KeyAscii = 13 And Len(Me.txT_new_dig.Text) > 0 Then Me.Btn_Ini_Correc.SetFocus

KeyAscii = 0
End Sub

Private Sub txt_new_rut_KeyPress(KeyAscii As Integer)
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then Exit Sub
If KeyAscii = 8 Then Exit Sub
If KeyAscii = 32 Then Exit Sub
If KeyAscii = 13 Then
If IsNumeric(txt_new_rut.Text) And Len(Trim(txt_new_rut.Text)) > 6 Then
    Me.txT_new_dig.Enabled = True
    Me.txT_new_dig.SetFocus
    
ElseIf Len(Trim(Me.txt_new_rut.Text)) >= 1 And Len(Trim(Me.txt_new_rut.Text)) <= 6 Then
  MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
    Me.txT_new_dig.Text = ""
    txt_new_rut.Text = ""
    Me.txt_new_rut.SetFocus
    SendKeys "{home}+{end}"
End If
End If
KeyAscii = 0
End Sub

Private Sub txt_nom_alu_Change()
Dim I As Integer
If Busqueda = 1 Then
    Me.btn_otro_alu.Enabled = False
    rs.CursorLocation = adUseClient
    lst_nom_alu.Clear
    If Not ((Chr(KeyAscii) >= "A" And Chr(KeyAscii) <= "Z") Or (Chr(KeyAscii) >= "a" And Chr(KeyAscii) <= "z")) Then
        KeyAscii = 0
        If Me.txt_nom_alu.Text <> "" Then
        Criterio = "'" + Me.txt_nom_alu.Text + Consulta + "%'"
        a = "SELECT DISTINCT p.ci_alu, p.ape_pat_alu, p.ape_mat_alu, p.nom_alu FROM postulantes p, alu_x_cur a where p.ci_alu = a.ci_alu and ape_pat_alu like " & Criterio & " order by ape_pat_alu, ape_mat_alu, nom_alu"
        rs.Open a, conn
            'arriba listo todos los alumnos que estan en postulantes y que alguna vez tuvieron
            'curso o sea están en alu_x_cur, le pongo distinct por si se repite.
            lst_nom_alu.Visible = False
            If rs.RecordCount > 0 Then
                ReDim aalumnos(rs.RecordCount, 2)
                Indi = 0
                X = 0
                lst_nom_alu.Visible = True
                While Not rs.EOF
                    'Me.Txt_cod_TipoApo.Text = rs(0)
                    lst_nom_alu.AddItem rs("ape_pat_alu") + " " + rs("ape_mat_alu") + " " + rs("nom_alu")
                    aalumnos(X, 1) = rs("ci_alu")
                    aalumnos(X, 2) = rs("nom_alu") & " " & rs("ape_pat_alu") & " " & rs("ape_mat_alu")
                    rs.MoveNext
                    X = X + 1
                Wend
            Else
                Indi = 0
            End If
            rs.Close
        Else
        lst_nom_alu.Visible = False
        End If
    End If
End If
End Sub

Private Sub txt_nom_exi_Change()
Dim I As Integer
If Busqueda = 1 Then
    Me.btn_otro_exi.Enabled = False
    rs.CursorLocation = adUseClient
    Me.lst_nom_exi.Clear
    If Not ((Chr(KeyAscii) >= "A" And Chr(KeyAscii) <= "Z") Or (Chr(KeyAscii) >= "a" And Chr(KeyAscii) <= "z")) Then
        KeyAscii = 0
        If Me.txt_nom_exi.Text <> "" Then
        Criterio = "'" + Me.txt_nom_exi.Text + Consulta + "%'"
        a = "SELECT DISTINCT p.ci_alu, p.ape_pat_alu, p.ape_mat_alu, p.nom_alu FROM postulantes p, alu_x_cur a where p.ci_alu = a.ci_alu and ape_pat_alu like " & Criterio & " and a.agno = " & Anno & " order by ape_pat_alu, ape_mat_alu, nom_alu"
        rs.Open a, conn
            'arriba listo todos los alumnos que estan en postulantes y que alguna vez tuvieron
            'curso o sea están en alu_x_cur, le pongo distinct por si se repite.
            lst_nom_exi.Visible = False
            If rs.RecordCount > 0 Then
                ReDim aalumnos(rs.RecordCount, 2)
                Indi = 0
                X = 0
                lst_nom_exi.Visible = True
                While Not rs.EOF
                    'Me.Txt_cod_TipoApo.Text = rs(0)
                    lst_nom_exi.AddItem rs("ape_pat_alu") + " " + rs("ape_mat_alu") + " " + rs("nom_alu")
                    aalumnos(X, 1) = rs("ci_alu")
                    aalumnos(X, 2) = rs("nom_alu") & " " & rs("ape_pat_alu") & " " & rs("ape_mat_alu")
                    rs.MoveNext
                    X = X + 1
                Wend
            Else
                Indi = 0
            End If
            rs.Close
        Else
        lst_nom_exi.Visible = False
        End If
    End If
End If
End Sub

Private Sub txt_nom_sit_prof_Change()
If Busqueda = 1 Then
rs.CursorLocation = adUseClient
'fetch the initial table ..
'rs.Open "SELECT * FROM tipo_apo", conn
lst_nom_sit_prof.Clear
If Not ((Chr(KeyAscii) >= "A" And Chr(KeyAscii) <= "Z") Or (Chr(KeyAscii) >= "a" And Chr(KeyAscii) <= "z")) Then
    KeyAscii = 0
    If Me.txt_nom_sit_prof.Text <> "" Then
      Criterio = "'" + Me.txt_nom_sit_prof.Text + Consulta + "%'"
      rs.Open "SELECT * FROM profesores where ape1_prof like " & Criterio & " order by ape1_prof, ape2_prof, noms_prof", conn
      'rs.FindFirst "des_pre like " + Criterio
            'rs.MoveFirst
        lst_nom_sit_prof.Visible = False
        'Me.Txt_cod_TipoApo.Text = ""
        If rs.RecordCount > 0 Then
            ReDim aprofesores(rs.RecordCount)
            Indi = 0
            X = 0
            While Not rs.EOF
                'Me.Txt_cod_TipoApo.Text = rs(0)
                lst_nom_sit_prof.AddItem rs("ape1_prof") + " " + rs("ape2_prof") + " " + rs("noms_prof")
                aprofesores(X) = rs("rut_prof")
                lst_nom_sit_prof.Visible = True
                rs.MoveNext
                X = X + 1
            Wend
        Else
            Indi = 0
        End If
        rs.Close
    Else
    lst_nom_sit_prof.Visible = False
    End If
End If
End If

End Sub

Private Sub txt_nom_sit_prof_KeyPress(KeyAscii As Integer)
'busqueda = 1
If KeyAscii = 27 Then
    Me.txt_nom_sit_prof.Text = ""
    Me.txt_rut_sit_prof.Text = ""
    Me.txt_dig_sit_prof.Text = ""
    Me.cmb_mod_asi_prof.Text = ""
    Me.cmb_numgra_sit_prof.Text = ""
    lst_nom_sit_prof.Visible = False
    KeyAscii = 0
'ElseIf KeyAscii = 13 And Len(Me.txt_nom_sit_prof.Text) <> 0 Then
'        Me.cmb_mod_asi_prof.Enabled = True
'        Me.cmb_mod_asi_prof.SetFocus
        'Call Btn_Tip_Aceptar_Click
ElseIf ((Chr(KeyAscii) >= "A" And Chr(KeyAscii) <= "Z") Or (Chr(KeyAscii) >= "a" And Chr(KeyAscii) <= "z")) Then Exit Sub
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
ElseIf Me.txt_nom_sit_prof.Text = "" Then
        If KeyAscii = 37 Then Exit Sub
End If
    KeyAscii = 0: Exit Sub
End Sub
