VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form_ficha 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Ficha de Postulación"
   ClientHeight    =   7710
   ClientLeft      =   1605
   ClientTop       =   1785
   ClientWidth     =   11295
   Icon            =   "Form_ficha.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   MousePointer    =   1  'Arrow
   Moveable        =   0   'False
   ScaleHeight     =   7710
   ScaleWidth      =   11295
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      BackColor       =   &H8000000F&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   285
      Left            =   480
      Locked          =   -1  'True
      TabIndex        =   239
      Top             =   6600
      Width           =   10575
   End
   Begin VB.Frame frmFecEval 
      Caption         =   "FECHAS DE EVALUACION"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   2775
      Left            =   6960
      TabIndex        =   235
      Top             =   3360
      Visible         =   0   'False
      Width           =   3135
      Begin VB.CommandButton btn_Cerrar 
         Caption         =   "Cerrar"
         Height          =   375
         Left            =   720
         TabIndex        =   236
         Top             =   2280
         Width           =   1695
      End
      Begin MSFlexGridLib.MSFlexGrid msfeceval 
         Height          =   2055
         Left            =   120
         TabIndex        =   237
         ToolTipText     =   "Presione Para Enviar"
         Top             =   240
         Width           =   2895
         _ExtentX        =   5106
         _ExtentY        =   3625
         _Version        =   393216
         Cols            =   3
         FixedCols       =   0
         BackColorSel    =   8454016
         ForeColorSel    =   -2147483640
         FillStyle       =   1
         ScrollBars      =   2
         SelectionMode   =   1
      End
   End
   Begin VB.Frame frame_anho 
      Height          =   2775
      Left            =   2880
      TabIndex        =   206
      Top             =   1560
      Width           =   5415
      Begin VB.Frame Frame3 
         Caption         =   "Alumnos Existentes"
         Height          =   855
         Index           =   1
         Left            =   240
         TabIndex        =   231
         Top             =   1680
         Width           =   3615
         Begin VB.OptionButton opt_anho_select_ant 
            Caption         =   "Año actual"
            Height          =   255
            Index           =   0
            Left            =   120
            TabIndex        =   233
            Top             =   360
            Value           =   -1  'True
            Width           =   1335
         End
         Begin VB.OptionButton opt_anho_select_ant 
            Caption         =   "Año próximo"
            Height          =   255
            Index           =   1
            Left            =   1920
            TabIndex        =   232
            Top             =   360
            Width           =   1335
         End
      End
      Begin VB.Frame Frame3 
         Caption         =   "Alumnos Nuevos"
         Height          =   855
         Index           =   0
         Left            =   240
         TabIndex        =   210
         Top             =   720
         Width           =   3615
         Begin VB.OptionButton opt_anho_select 
            Caption         =   "Año próximo"
            Height          =   255
            Index           =   1
            Left            =   1920
            TabIndex        =   212
            Top             =   360
            Value           =   -1  'True
            Width           =   1335
         End
         Begin VB.OptionButton opt_anho_select 
            Caption         =   "Año actual"
            Height          =   255
            Index           =   0
            Left            =   120
            TabIndex        =   211
            Top             =   360
            Width           =   1335
         End
      End
      Begin VB.CommandButton btn_aceptar_anho 
         Caption         =   "Aceptar"
         Height          =   375
         Left            =   3960
         TabIndex        =   207
         TabStop         =   0   'False
         Top             =   1320
         Width           =   1335
      End
      Begin VB.Label Label16 
         Alignment       =   2  'Center
         Caption         =   "Parametros de Año de Inscripción"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   720
         TabIndex        =   208
         Top             =   240
         Width           =   3735
      End
   End
   Begin VB.Frame frame_sombra 
      BackColor       =   &H80000015&
      BorderStyle     =   0  'None
      Caption         =   "Frame4"
      ForeColor       =   &H80000015&
      Height          =   2655
      Left            =   3000
      TabIndex        =   230
      Top             =   1800
      Width           =   5415
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   7155
      Left            =   120
      TabIndex        =   97
      TabStop         =   0   'False
      Top             =   480
      Width           =   11100
      _ExtentX        =   19579
      _ExtentY        =   12621
      _Version        =   393216
      Tabs            =   7
      Tab             =   6
      TabsPerRow      =   7
      TabHeight       =   917
      TabMaxWidth     =   18
      ShowFocusRect   =   0   'False
      ForeColor       =   8388608
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      TabCaption(0)   =   "  Datos del  Alumno"
      TabPicture(0)   =   "Form_ficha.frx":2A8B2
      Tab(0).ControlEnabled=   0   'False
      Tab(0).Control(0)=   "btn_otro_alumno"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "BTN_CAMBIA_ANHO"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "frame_alu"
      Tab(0).Control(3)=   "Btn_Eli_0"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "Btn_sgte_0"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "btn_can_0"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).ControlCount=   6
      TabCaption(1)   =   "     Datos del  Apoderado"
      TabPicture(1)   =   "Form_ficha.frx":2A8CE
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "txt_rut_apo"
      Tab(1).Control(0).Enabled=   0   'False
      Tab(1).Control(1)=   "txt_dig_apo"
      Tab(1).Control(1).Enabled=   0   'False
      Tab(1).Control(2)=   "btn_cam_apo"
      Tab(1).Control(2).Enabled=   0   'False
      Tab(1).Control(3)=   "btn_otro_alumno2"
      Tab(1).Control(3).Enabled=   0   'False
      Tab(1).Control(4)=   "btn_can_1"
      Tab(1).Control(4).Enabled=   0   'False
      Tab(1).Control(5)=   "btn_sgte_1"
      Tab(1).Control(5).Enabled=   0   'False
      Tab(1).Control(6)=   "Btn_Anterior_1"
      Tab(1).Control(6).Enabled=   0   'False
      Tab(1).Control(7)=   "Frame_apo"
      Tab(1).Control(8)=   "Label17"
      Tab(1).Control(9)=   "lbl_rut_apo"
      Tab(1).Control(10)=   "Line1"
      Tab(1).ControlCount=   11
      TabCaption(2)   =   "   Datos de los   Padres"
      TabPicture(2)   =   "Form_ficha.frx":2A8EA
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "Frame_pad"
      Tab(2).Control(1)=   "btn_can_2"
      Tab(2).Control(1).Enabled=   0   'False
      Tab(2).Control(2)=   "btn_sgte_2"
      Tab(2).Control(2).Enabled=   0   'False
      Tab(2).Control(3)=   "btn_anterior_2"
      Tab(2).Control(3).Enabled=   0   'False
      Tab(2).Control(4)=   "btn_otro_alumno3"
      Tab(2).Control(4).Enabled=   0   'False
      Tab(2).ControlCount=   5
      TabCaption(3)   =   "Antecedentes Familiares"
      TabPicture(3)   =   "Form_ficha.frx":2A906
      Tab(3).ControlEnabled=   0   'False
      Tab(3).Control(0)=   "btn_otro_alumno4"
      Tab(3).Control(0).Enabled=   0   'False
      Tab(3).Control(1)=   "btn_can_3"
      Tab(3).Control(1).Enabled=   0   'False
      Tab(3).Control(2)=   "btn_sgte_3"
      Tab(3).Control(2).Enabled=   0   'False
      Tab(3).Control(3)=   "btn_anterior_3"
      Tab(3).Control(3).Enabled=   0   'False
      Tab(3).Control(4)=   "Frame_ant"
      Tab(3).Control(4).Enabled=   0   'False
      Tab(3).ControlCount=   5
      TabCaption(4)   =   "Documentos que Entrega"
      TabPicture(4)   =   "Form_ficha.frx":2A922
      Tab(4).ControlEnabled=   0   'False
      Tab(4).Control(0)=   "Frame_doc_alu(1)"
      Tab(4).Control(0).Enabled=   0   'False
      Tab(4).Control(1)=   "btn_otro_alumno5"
      Tab(4).Control(1).Enabled=   0   'False
      Tab(4).Control(2)=   "btn_can_4"
      Tab(4).Control(2).Enabled=   0   'False
      Tab(4).Control(3)=   "btn_sgte_4"
      Tab(4).Control(3).Enabled=   0   'False
      Tab(4).Control(4)=   "btn_anterior_4"
      Tab(4).Control(4).Enabled=   0   'False
      Tab(4).Control(5)=   "Frame_doc_alu(0)"
      Tab(4).Control(5).Enabled=   0   'False
      Tab(4).ControlCount=   6
      TabCaption(5)   =   "     Otros     Antecentes"
      TabPicture(5)   =   "Form_ficha.frx":2A93E
      Tab(5).ControlEnabled=   0   'False
      Tab(5).Control(0)=   "btn_otro_alumno6"
      Tab(5).Control(0).Enabled=   0   'False
      Tab(5).Control(1)=   "frame_otro_ant"
      Tab(5).Control(1).Enabled=   0   'False
      Tab(5).Control(2)=   "btn_can_5"
      Tab(5).Control(2).Enabled=   0   'False
      Tab(5).Control(3)=   "btn_sgte_5"
      Tab(5).Control(3).Enabled=   0   'False
      Tab(5).Control(4)=   "btn_anterior_5"
      Tab(5).Control(4).Enabled=   0   'False
      Tab(5).ControlCount=   5
      TabCaption(6)   =   "      Datos de      Inscripcion"
      TabPicture(6)   =   "Form_ficha.frx":2A95A
      Tab(6).ControlEnabled=   -1  'True
      Tab(6).Control(0)=   "frame_ins"
      Tab(6).Control(0).Enabled=   0   'False
      Tab(6).Control(1)=   "btn_anterior_6"
      Tab(6).Control(1).Enabled=   0   'False
      Tab(6).Control(2)=   "btn_ace_opc"
      Tab(6).Control(2).Enabled=   0   'False
      Tab(6).Control(3)=   "btn_can_opc"
      Tab(6).Control(3).Enabled=   0   'False
      Tab(6).Control(4)=   "btn_otro_alumno7"
      Tab(6).Control(4).Enabled=   0   'False
      Tab(6).ControlCount=   5
      Begin VB.Frame Frame_doc_alu 
         Caption         =   "V OTROS DOCUMENTOS"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1335
         Index           =   1
         Left            =   -74400
         TabIndex        =   240
         Top             =   3240
         Width           =   9975
         Begin VB.CheckBox che_doc_her 
            Caption         =   "Documentos de Certificación de Descuento por Hermano"
            Height          =   255
            Left            =   840
            TabIndex        =   241
            Top             =   600
            Width           =   4815
         End
      End
      Begin VB.TextBox txt_rut_apo 
         Height          =   285
         Left            =   -72120
         MaxLength       =   8
         TabIndex        =   25
         TabStop         =   0   'False
         Top             =   1080
         Width           =   855
      End
      Begin VB.TextBox txt_dig_apo 
         Enabled         =   0   'False
         Height          =   285
         Left            =   -71160
         MaxLength       =   1
         TabIndex        =   26
         TabStop         =   0   'False
         Top             =   1080
         Width           =   255
      End
      Begin VB.CommandButton btn_cam_apo 
         Caption         =   "Cambiar Apoderado"
         Enabled         =   0   'False
         Height          =   375
         Left            =   -74760
         TabIndex        =   223
         TabStop         =   0   'False
         Top             =   6600
         Visible         =   0   'False
         Width           =   1695
      End
      Begin VB.CommandButton btn_otro_alumno7 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   5160
         TabIndex        =   222
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_otro_alumno6 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   -69840
         TabIndex        =   221
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_otro_alumno5 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   -69840
         TabIndex        =   220
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_otro_alumno4 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   -69840
         TabIndex        =   219
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_otro_alumno3 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   -69840
         TabIndex        =   218
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_otro_alumno2 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   -69840
         TabIndex        =   217
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_otro_alumno 
         Caption         =   "Otro alumno"
         Height          =   375
         Left            =   -69840
         TabIndex        =   216
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.Frame frame_otro_ant 
         Caption         =   "VI OTROS ANTECEDENTES"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   2895
         Left            =   -72600
         TabIndex        =   151
         Top             =   1680
         Width           =   6495
         Begin VB.ComboBox cmb_repitente 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2A976
            Left            =   5040
            List            =   "Form_ficha.frx":2A980
            Style           =   2  'Dropdown List
            TabIndex        =   86
            TabStop         =   0   'False
            Top             =   2400
            Width           =   1095
         End
         Begin VB.ComboBox Cmb_indigena 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2A994
            Left            =   5040
            List            =   "Form_ficha.frx":2A99E
            Style           =   2  'Dropdown List
            TabIndex        =   84
            TabStop         =   0   'False
            Top             =   1440
            Width           =   1095
         End
         Begin VB.ComboBox Cmb_embarazo 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2A9B2
            Left            =   5040
            List            =   "Form_ficha.frx":2A9BC
            Style           =   2  'Dropdown List
            TabIndex        =   85
            TabStop         =   0   'False
            Top             =   1920
            Width           =   1095
         End
         Begin VB.ComboBox cmb_sol_ant 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2A9D0
            Left            =   5040
            List            =   "Form_ficha.frx":2A9DA
            Style           =   2  'Dropdown List
            TabIndex        =   83
            TabStop         =   0   'False
            Top             =   480
            Width           =   1095
         End
         Begin VB.ComboBox cmb_com_ant 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2A9E6
            Left            =   5040
            List            =   "Form_ficha.frx":2A9F0
            Style           =   2  'Dropdown List
            TabIndex        =   73
            TabStop         =   0   'False
            Top             =   960
            Width           =   1095
         End
         Begin VB.Label lblrepitencia 
            Caption         =   "Alumno(a) repitente"
            Height          =   375
            Left            =   240
            TabIndex        =   215
            Top             =   2400
            Width           =   2175
         End
         Begin VB.Label Label18 
            Caption         =   "Alumno(a) Indígena"
            Height          =   375
            Left            =   240
            TabIndex        =   214
            Top             =   1440
            Width           =   1935
         End
         Begin VB.Label lblembarazo 
            Caption         =   "Alumna embarazada"
            Height          =   375
            Left            =   240
            TabIndex        =   213
            Top             =   1920
            Width           =   2175
         End
         Begin VB.Label lbl_sol_ant 
            Caption         =   "Solicita Carné Escolar"
            Height          =   375
            Left            =   240
            TabIndex        =   153
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Llbl_com_ant 
            Caption         =   "Completo Formulario de Eximision de Religion"
            Height          =   375
            Left            =   240
            TabIndex        =   152
            Top             =   960
            Width           =   4335
         End
      End
      Begin VB.CommandButton BTN_CAMBIA_ANHO 
         Caption         =   "Cambiar Año"
         Height          =   375
         Left            =   -74760
         TabIndex        =   209
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.Frame frame_alu 
         Caption         =   "Datos del Alumno"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   5175
         Left            =   -74760
         TabIndex        =   174
         Top             =   720
         Width           =   10575
         Begin VB.ComboBox Cmd_nac_alu 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2A9FC
            Left            =   8280
            List            =   "Form_ficha.frx":2AA06
            Style           =   2  'Dropdown List
            TabIndex        =   12
            Top             =   2160
            Width           =   735
         End
         Begin VB.TextBox txt_eda_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   8280
            Locked          =   -1  'True
            MaxLength       =   2
            TabIndex        =   10
            TabStop         =   0   'False
            Top             =   1800
            Width           =   495
         End
         Begin VB.ListBox lst_app_alu 
            Height          =   1035
            Left            =   2160
            TabIndex        =   91
            TabStop         =   0   'False
            Top             =   600
            Width           =   4095
         End
         Begin VB.ComboBox Cmb_jor_alu 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2AA12
            Left            =   8280
            List            =   "Form_ficha.frx":2AA14
            TabIndex        =   8
            TabStop         =   0   'False
            Text            =   "Cmb_jor_alu"
            Top             =   1320
            Width           =   2175
         End
         Begin VB.TextBox txt_dir_alu 
            Height          =   285
            Left            =   2160
            MaxLength       =   40
            TabIndex        =   13
            TabStop         =   0   'False
            Top             =   2520
            Width           =   3975
         End
         Begin VB.ComboBox cmb_sex_alu 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2AA16
            Left            =   2160
            List            =   "Form_ficha.frx":2AA20
            TabIndex        =   11
            TabStop         =   0   'False
            Text            =   "cmb_sex_alu"
            Top             =   2160
            Width           =   615
         End
         Begin VB.ComboBox cmb_com_alu 
            Enabled         =   0   'False
            Height          =   315
            Left            =   8280
            TabIndex        =   14
            TabStop         =   0   'False
            Text            =   "cmb_com_alu"
            Top             =   2520
            Width           =   2175
         End
         Begin VB.TextBox txt_pro_alu 
            Height          =   285
            Left            =   2160
            MaxLength       =   30
            TabIndex        =   17
            TabStop         =   0   'False
            Top             =   3240
            Width           =   3975
         End
         Begin VB.TextBox txt_apm_alu 
            Height          =   285
            Left            =   8280
            MaxLength       =   25
            TabIndex        =   2
            TabStop         =   0   'False
            Top             =   360
            Width           =   2175
         End
         Begin VB.TextBox txT_dig_alu 
            Height          =   285
            Left            =   9240
            MaxLength       =   1
            TabIndex        =   5
            TabStop         =   0   'False
            Top             =   720
            Width           =   255
         End
         Begin VB.TextBox txt_rut_alu 
            Height          =   285
            Left            =   8280
            MaxLength       =   8
            TabIndex        =   4
            TabStop         =   0   'False
            Top             =   720
            Width           =   855
         End
         Begin VB.TextBox txt_app_alu 
            Height          =   285
            Left            =   2160
            MaxLength       =   25
            TabIndex        =   1
            TabStop         =   0   'False
            Top             =   360
            Width           =   2775
         End
         Begin VB.TextBox txt_nom_alu 
            Height          =   285
            Left            =   2160
            MaxLength       =   45
            TabIndex        =   3
            TabStop         =   0   'False
            Top             =   720
            Width           =   2775
         End
         Begin VB.TextBox txt_col_alu 
            Height          =   285
            Left            =   14520
            TabIndex        =   175
            Top             =   2520
            Width           =   1695
         End
         Begin VB.TextBox txt_enf_alu 
            Height          =   285
            Left            =   2880
            MaxLength       =   50
            TabIndex        =   18
            TabStop         =   0   'False
            Top             =   3720
            Width           =   7575
         End
         Begin VB.TextBox txt_tra_alu 
            Height          =   285
            Left            =   2880
            MaxLength       =   50
            TabIndex        =   19
            TabStop         =   0   'False
            Top             =   4080
            Width           =   2655
         End
         Begin VB.TextBox txt_ale_alu 
            Height          =   285
            Left            =   7080
            MaxLength       =   30
            TabIndex        =   20
            TabStop         =   0   'False
            Top             =   4080
            Width           =   2175
         End
         Begin VB.TextBox txt_eme_alu 
            Height          =   285
            Left            =   2880
            MaxLength       =   30
            TabIndex        =   21
            TabStop         =   0   'False
            Top             =   4440
            Width           =   2655
         End
         Begin VB.TextBox txt_fon_eme_alu 
            Height          =   285
            Left            =   7080
            MaxLength       =   12
            TabIndex        =   22
            TabStop         =   0   'False
            Top             =   4440
            Width           =   1215
         End
         Begin VB.TextBox txt_estado_alu 
            Enabled         =   0   'False
            Height          =   285
            Left            =   7080
            TabIndex        =   24
            TabStop         =   0   'False
            Top             =   4800
            Width           =   3375
         End
         Begin VB.ComboBox cmb_reg_alu 
            Enabled         =   0   'False
            Height          =   315
            ItemData        =   "Form_ficha.frx":2AA2A
            Left            =   2160
            List            =   "Form_ficha.frx":2AA2C
            Style           =   1  'Simple Combo
            TabIndex        =   15
            TabStop         =   0   'False
            Top             =   2880
            Width           =   2175
         End
         Begin VB.ComboBox cmb_exi_alu 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2AA2E
            Left            =   2880
            List            =   "Form_ficha.frx":2AA38
            TabIndex        =   23
            TabStop         =   0   'False
            Text            =   "cmb_exi_alu"
            Top             =   4800
            Width           =   615
         End
         Begin VB.ComboBox Cmb_mod_cur 
            Height          =   315
            Left            =   2160
            TabIndex        =   6
            TabStop         =   0   'False
            Text            =   "Cmb_mod_cur"
            Top             =   1320
            Width           =   2775
         End
         Begin VB.ComboBox cmb_cur_ins 
            Height          =   315
            Left            =   5550
            TabIndex        =   7
            TabStop         =   0   'False
            Text            =   "cmb_cur_ins"
            Top             =   1320
            Width           =   615
         End
         Begin MSComCtl2.DTPicker dtp_fec_alu 
            BeginProperty DataFormat 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2058
               SubFormatType   =   3
            EndProperty
            Height          =   375
            Left            =   2160
            TabIndex        =   9
            TabStop         =   0   'False
            Top             =   1800
            Width           =   1575
            _ExtentX        =   2778
            _ExtentY        =   661
            _Version        =   393216
            MousePointer    =   4
            CustomFormat    =   "dd/mm/yyyy"
            Format          =   49479681
            CurrentDate     =   36526
            MaxDate         =   73415
            MinDate         =   27760
         End
         Begin VB.TextBox txt_fon_alu 
            Height          =   285
            IMEMode         =   3  'DISABLE
            Left            =   8280
            MaxLength       =   12
            TabIndex        =   16
            TabStop         =   0   'False
            Top             =   2880
            Width           =   1335
         End
         Begin VB.Label Label14 
            Caption         =   "Jornada"
            Height          =   255
            Left            =   6360
            TabIndex        =   199
            Top             =   1320
            Width           =   1095
         End
         Begin VB.Label Label12 
            Caption         =   "Dirección"
            Height          =   255
            Left            =   120
            TabIndex        =   198
            Top             =   2520
            Width           =   1575
         End
         Begin VB.Line Line14 
            BorderColor     =   &H8000000E&
            X1              =   15
            X2              =   10530
            Y1              =   3615
            Y2              =   3615
         End
         Begin VB.Line Line13 
            BorderColor     =   &H80000010&
            X1              =   15
            X2              =   10530
            Y1              =   3600
            Y2              =   3600
         End
         Begin VB.Label Label13 
            Caption         =   " Curso al que postula"
            ForeColor       =   &H00FF0000&
            Height          =   255
            Left            =   4870
            TabIndex        =   197
            Top             =   1080
            Width           =   1575
         End
         Begin VB.Line Line11 
            BorderColor     =   &H80000010&
            X1              =   15
            X2              =   10530
            Y1              =   1150
            Y2              =   1150
         End
         Begin VB.Line Line9 
            BorderColor     =   &H80000010&
            X1              =   15
            X2              =   10530
            Y1              =   1680
            Y2              =   1680
         End
         Begin VB.Line Line2 
            X1              =   9120
            X2              =   9240
            Y1              =   840
            Y2              =   840
         End
         Begin VB.Label Label2 
            Caption         =   "Apellido Materno"
            Height          =   375
            Left            =   6360
            TabIndex        =   196
            Top             =   360
            Width           =   1575
         End
         Begin VB.Label lbl_rut_alu 
            Caption         =   "Rut"
            Height          =   375
            Left            =   6360
            TabIndex        =   195
            Top             =   720
            Width           =   615
         End
         Begin VB.Label lbl_ape_alu 
            Caption         =   "Apellido Paterno"
            Height          =   255
            Left            =   120
            TabIndex        =   194
            Top             =   360
            Width           =   1575
         End
         Begin VB.Label lbl_eda_alu 
            Caption         =   "Edad al 30/6"
            Height          =   255
            Left            =   6360
            TabIndex        =   193
            Top             =   1800
            Width           =   1575
         End
         Begin VB.Label lbl_nom_alu 
            Caption         =   "Nombres"
            Height          =   255
            Left            =   120
            TabIndex        =   192
            Top             =   720
            Width           =   1575
         End
         Begin VB.Label lbl_com_alu 
            Caption         =   "Comuna"
            Height          =   255
            Left            =   6360
            TabIndex        =   191
            Top             =   2520
            Width           =   1575
         End
         Begin VB.Label lbl_sex_alu 
            Caption         =   "Sexo"
            Height          =   255
            Left            =   120
            TabIndex        =   190
            Top             =   2160
            Width           =   1335
         End
         Begin VB.Label Txt_nac_Alu 
            Caption         =   "Alumno Extranjero"
            Height          =   255
            Left            =   6360
            TabIndex        =   189
            Top             =   2160
            Width           =   1815
         End
         Begin VB.Label lbl_col_alu 
            Caption         =   "Colegio Procedencia "
            Height          =   255
            Left            =   120
            TabIndex        =   188
            Top             =   3240
            Width           =   2055
         End
         Begin VB.Label Label1 
            Caption         =   "Enfermedades que tiene o ha tenido "
            Height          =   255
            Left            =   120
            TabIndex        =   187
            Top             =   3720
            Width           =   3375
         End
         Begin VB.Label lbl_tra_alu 
            Caption         =   "Tratamiento a seguir"
            Height          =   255
            Left            =   120
            TabIndex        =   186
            Top             =   4080
            Width           =   2055
         End
         Begin VB.Label lbl_ale_alu 
            Caption         =   "Alérgico a"
            Height          =   255
            Left            =   5760
            TabIndex        =   185
            Top             =   4080
            Width           =   1335
         End
         Begin VB.Label lbl_eme_alu 
            Caption         =   "En caso de Emergencia avisar a"
            Height          =   255
            Left            =   120
            TabIndex        =   184
            Top             =   4440
            Width           =   3015
         End
         Begin VB.Label lbl_fon_eme_alu 
            Caption         =   "Fono "
            Height          =   255
            Left            =   5760
            TabIndex        =   183
            Top             =   4440
            Width           =   1215
         End
         Begin VB.Label Label11 
            Caption         =   "Estado Actual"
            Height          =   255
            Left            =   5760
            TabIndex        =   182
            Top             =   4800
            Width           =   1455
         End
         Begin VB.Label lbl_reg_alu 
            Caption         =   "Región"
            Height          =   255
            Left            =   120
            TabIndex        =   181
            Top             =   2880
            Width           =   1215
         End
         Begin VB.Label lbl_fon_alu 
            Caption         =   "Fono"
            Height          =   255
            Left            =   6360
            TabIndex        =   180
            Top             =   2880
            Width           =   975
         End
         Begin VB.Label lbl_fec_alu 
            Caption         =   "Fecha de Nacimiento"
            Height          =   375
            Left            =   120
            TabIndex        =   179
            Top             =   1800
            Width           =   2175
         End
         Begin VB.Label lbl_exi_alu 
            Caption         =   "Se exime de Religión"
            Height          =   255
            Left            =   120
            TabIndex        =   178
            Top             =   4800
            Width           =   2295
         End
         Begin VB.Label lbl_cur_ins 
            Caption         =   "Nivel"
            Height          =   255
            Left            =   5040
            TabIndex        =   177
            Top             =   1320
            Width           =   495
         End
         Begin VB.Label lbl_mod_ins 
            Caption         =   "Modalidad"
            Height          =   255
            Left            =   120
            TabIndex        =   176
            Top             =   1320
            Width           =   1215
         End
         Begin VB.Line Line10 
            BorderColor     =   &H8000000E&
            X1              =   15
            X2              =   10530
            Y1              =   1695
            Y2              =   1695
         End
         Begin VB.Line Line12 
            BorderColor     =   &H8000000E&
            X1              =   15
            X2              =   10530
            Y1              =   1165
            Y2              =   1165
         End
      End
      Begin VB.CommandButton btn_can_opc 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   6600
         TabIndex        =   173
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_ace_opc 
         Caption         =   "Finalizar"
         Height          =   375
         Left            =   3720
         TabIndex        =   172
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_anterior_6 
         Caption         =   "Anterior"
         Height          =   375
         Left            =   2280
         TabIndex        =   171
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_can_1 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   -68400
         TabIndex        =   170
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_sgte_1 
         Caption         =   "Siguiente"
         Height          =   375
         Left            =   -71280
         TabIndex        =   169
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton Btn_Anterior_1 
         Caption         =   "Anterior"
         Height          =   375
         Left            =   -72720
         TabIndex        =   168
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_can_3 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   -68400
         TabIndex        =   167
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_sgte_3 
         Caption         =   "Siguiente"
         Height          =   375
         Left            =   -71280
         TabIndex        =   166
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_anterior_3 
         Caption         =   "Anterior"
         Height          =   375
         Left            =   -72720
         TabIndex        =   165
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_anterior_2 
         Caption         =   "Anterior"
         Height          =   375
         Left            =   -72720
         TabIndex        =   164
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_sgte_2 
         Caption         =   "Siguiente"
         Height          =   375
         Left            =   -71280
         TabIndex        =   163
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_can_2 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   -68400
         TabIndex        =   162
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton Btn_Eli_0 
         Caption         =   "Eliminar"
         Height          =   375
         Left            =   -72720
         TabIndex        =   94
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton Btn_sgte_0 
         Caption         =   "Siguiente"
         Height          =   375
         Left            =   -71280
         TabIndex        =   92
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_can_0 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   -68400
         TabIndex        =   93
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_can_5 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   -68400
         TabIndex        =   160
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_sgte_5 
         Caption         =   "Siguiente"
         Height          =   375
         Left            =   -71280
         TabIndex        =   159
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_anterior_5 
         Caption         =   "Anterior"
         Height          =   375
         Left            =   -72720
         TabIndex        =   158
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_can_4 
         Caption         =   "Cancelar"
         Height          =   375
         Left            =   -68400
         TabIndex        =   157
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_sgte_4 
         Caption         =   "Siguiente"
         Height          =   375
         Left            =   -71280
         TabIndex        =   156
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.CommandButton btn_anterior_4 
         Caption         =   "Anterior"
         Height          =   375
         Left            =   -72720
         TabIndex        =   155
         TabStop         =   0   'False
         Top             =   6600
         Width           =   1215
      End
      Begin VB.Frame Frame_doc_alu 
         Caption         =   "V DOCUMENTOS QUE ENTREGA"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1935
         Index           =   0
         Left            =   -74400
         TabIndex        =   154
         Top             =   1200
         Width           =   9975
         Begin VB.CheckBox che_fot_doc 
            Caption         =   "Fotos"
            Height          =   375
            Left            =   840
            TabIndex        =   82
            TabStop         =   0   'False
            Top             =   1080
            Width           =   1575
         End
         Begin VB.CheckBox che_par_doc 
            Caption         =   "Certificado de Estudio  Ultimo Curso Realizado"
            Height          =   495
            Left            =   4440
            TabIndex        =   81
            TabStop         =   0   'False
            Top             =   960
            Width           =   4575
         End
         Begin VB.CheckBox che_inf_doc 
            Caption         =   "Informe de Notas Parciales"
            Height          =   375
            Left            =   4440
            TabIndex        =   80
            TabStop         =   0   'False
            Top             =   600
            Width           =   3495
         End
         Begin VB.CheckBox Che_cer_doc 
            Caption         =   " Certificado de Nacimiento"
            Height          =   375
            Left            =   840
            TabIndex        =   79
            TabStop         =   0   'False
            Top             =   600
            Width           =   4335
         End
      End
      Begin VB.Frame Frame_pad 
         BackColor       =   &H80000004&
         Caption         =   "III DATOS DE LOS PADRES"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   5535
         Left            =   -74760
         TabIndex        =   127
         Top             =   600
         Width           =   10575
         Begin VB.Frame Frame1 
            Caption         =   "Datos del Padre"
            ForeColor       =   &H00FF0000&
            Height          =   2535
            Left            =   120
            TabIndex        =   137
            Top             =   2880
            Width           =   10335
            Begin VB.TextBox txt_emp_cel2_ant 
               Height          =   285
               Left            =   2520
               MaxLength       =   12
               TabIndex        =   228
               TabStop         =   0   'False
               Top             =   2160
               Width           =   1455
            End
            Begin VB.ComboBox cmb_ni2_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2AA44
               Left            =   2520
               List            =   "Form_ficha.frx":2AA69
               TabIndex        =   60
               TabStop         =   0   'False
               Text            =   "cmb_ni2_ant"
               Top             =   1440
               Width           =   2775
            End
            Begin VB.ComboBox cmb_comu2_ant 
               Height          =   315
               Left            =   8040
               TabIndex        =   57
               TabStop         =   0   'False
               Text            =   "cmb_comu2_ant"
               Top             =   720
               Width           =   2055
            End
            Begin VB.ComboBox cmb_reg2_ant 
               Enabled         =   0   'False
               Height          =   315
               Left            =   2520
               Style           =   1  'Simple Combo
               TabIndex        =   58
               TabStop         =   0   'False
               Top             =   1080
               Width           =   2055
            End
            Begin VB.TextBox txt_nom2_ant 
               Height          =   285
               Left            =   4920
               MaxLength       =   50
               TabIndex        =   55
               TabStop         =   0   'False
               Top             =   360
               Width           =   5175
            End
            Begin VB.TextBox txt_di2_ant 
               Height          =   285
               Left            =   2520
               MaxLength       =   40
               TabIndex        =   56
               TabStop         =   0   'False
               Top             =   720
               Width           =   4215
            End
            Begin VB.TextBox txt_fo2_ant 
               Height          =   285
               Left            =   8040
               MaxLength       =   8
               TabIndex        =   59
               TabStop         =   0   'False
               Top             =   1080
               Width           =   1455
            End
            Begin VB.TextBox txt_em2_ant 
               Height          =   285
               Left            =   2520
               MaxLength       =   25
               TabIndex        =   62
               TabStop         =   0   'False
               Top             =   1800
               Width           =   4215
            End
            Begin VB.TextBox txt_ru2_ant 
               Height          =   285
               Left            =   1200
               MaxLength       =   8
               TabIndex        =   53
               TabStop         =   0   'False
               Top             =   360
               Width           =   855
            End
            Begin VB.TextBox txT_pr2_ant 
               Height          =   285
               Left            =   8040
               MaxLength       =   25
               TabIndex        =   61
               TabStop         =   0   'False
               Top             =   1440
               Width           =   2055
            End
            Begin VB.TextBox txt_emp_fo2_ant 
               Height          =   285
               Left            =   8040
               MaxLength       =   8
               TabIndex        =   63
               TabStop         =   0   'False
               Top             =   1800
               Width           =   1455
            End
            Begin VB.TextBox txt_dig_pad 
               Enabled         =   0   'False
               Height          =   285
               Left            =   2160
               TabIndex        =   54
               TabStop         =   0   'False
               Top             =   360
               Width           =   255
            End
            Begin VB.Image Image2 
               Height          =   480
               Left            =   9720
               Picture         =   "Form_ficha.frx":2AB5D
               Stretch         =   -1  'True
               ToolTipText     =   "Rescata los Datos de Apoderado para el Padre"
               Top             =   2040
               Width           =   600
            End
            Begin VB.Label lbl_cel2_ant 
               Caption         =   "Celular"
               Height          =   255
               Left            =   120
               TabIndex        =   229
               Top             =   2160
               Width           =   855
            End
            Begin VB.Label Label9 
               Caption         =   "Ciudad"
               Height          =   255
               Left            =   120
               TabIndex        =   204
               Top             =   1080
               Width           =   975
            End
            Begin VB.Label lbl_no2_ant 
               Caption         =   "Nombre Completo Padre"
               Height          =   255
               Left            =   2520
               TabIndex        =   202
               Top             =   360
               Width           =   2295
            End
            Begin VB.Label lbl_di2_ant 
               Caption         =   "Direccion"
               Height          =   255
               Left            =   120
               TabIndex        =   145
               Top             =   720
               Width           =   1215
            End
            Begin VB.Label lbl_co2_ant 
               Caption         =   "Comuna"
               Height          =   255
               Left            =   6960
               TabIndex        =   144
               Top             =   720
               Width           =   975
            End
            Begin VB.Label lbl_fo2_ant 
               Caption         =   "Fono"
               Height          =   255
               Left            =   6960
               TabIndex        =   143
               Top             =   1080
               Width           =   975
            End
            Begin VB.Label lbl_ru2_ant 
               Caption         =   "Rut"
               Height          =   255
               Left            =   120
               TabIndex        =   142
               Top             =   360
               Width           =   735
            End
            Begin VB.Label lbl_ni2_ant 
               Caption         =   "Nivel Educacional"
               Height          =   255
               Left            =   120
               TabIndex        =   141
               Top             =   1440
               Width           =   1695
            End
            Begin VB.Label lbl_pr2_ant 
               Caption         =   "Ocupación"
               Height          =   255
               Left            =   6960
               TabIndex        =   140
               Top             =   1440
               Width           =   975
            End
            Begin VB.Label lbl_em2_ant 
               Caption         =   "Empresa Donde Trabaja"
               Height          =   255
               Left            =   120
               TabIndex        =   139
               Top             =   1800
               Width           =   2295
            End
            Begin VB.Label lbl_fn2_ant 
               Caption         =   "Fono Trabajo"
               Height          =   255
               Left            =   6960
               TabIndex        =   138
               Top             =   1800
               Width           =   975
            End
            Begin VB.Line Line4 
               X1              =   2040
               X2              =   2160
               Y1              =   480
               Y2              =   480
            End
         End
         Begin VB.Frame Frame2 
            Caption         =   "Datos de la Madre"
            ForeColor       =   &H00FF0000&
            Height          =   2535
            Left            =   120
            TabIndex        =   128
            Top             =   240
            Width           =   10335
            Begin VB.TextBox txt_emp_cel_ant 
               Height          =   285
               Left            =   2520
               MaxLength       =   12
               TabIndex        =   227
               TabStop         =   0   'False
               Top             =   2160
               Width           =   1455
            End
            Begin VB.ComboBox cmb_niv_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2AF9F
               Left            =   2520
               List            =   "Form_ficha.frx":2AFC4
               TabIndex        =   49
               TabStop         =   0   'False
               Text            =   "cmb_niv_ant"
               Top             =   1440
               Width           =   2775
            End
            Begin VB.ComboBox cmb_reg_ant 
               Enabled         =   0   'False
               Height          =   315
               Left            =   2520
               Style           =   1  'Simple Combo
               TabIndex        =   47
               TabStop         =   0   'False
               Top             =   1080
               Width           =   2055
            End
            Begin VB.ComboBox cmb_comu_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2B0B8
               Left            =   8040
               List            =   "Form_ficha.frx":2B0BA
               TabIndex        =   46
               TabStop         =   0   'False
               Text            =   "cmb_comu_ant"
               Top             =   720
               Width           =   2055
            End
            Begin VB.TextBox txt_mad_Ant 
               Height          =   285
               Left            =   4920
               MaxLength       =   40
               TabIndex        =   44
               TabStop         =   0   'False
               Top             =   360
               Width           =   5175
            End
            Begin VB.TextBox txt_dir_ant 
               Height          =   285
               Left            =   2520
               MaxLength       =   40
               TabIndex        =   45
               TabStop         =   0   'False
               Top             =   720
               Width           =   4215
            End
            Begin VB.TextBox txt_emp_fon_ant 
               Height          =   285
               Left            =   8040
               MaxLength       =   8
               TabIndex        =   52
               TabStop         =   0   'False
               Top             =   1800
               Width           =   1455
            End
            Begin VB.TextBox txt_pro_ant 
               Height          =   285
               Left            =   8040
               MaxLength       =   25
               TabIndex        =   50
               TabStop         =   0   'False
               Top             =   1440
               Width           =   2055
            End
            Begin VB.TextBox txt_rut_ant 
               BackColor       =   &H00FFFFFF&
               Height          =   285
               Left            =   1200
               MaxLength       =   8
               TabIndex        =   42
               TabStop         =   0   'False
               Top             =   360
               Width           =   855
            End
            Begin VB.TextBox txt_emp_ant 
               Height          =   285
               Left            =   2520
               MaxLength       =   25
               TabIndex        =   51
               TabStop         =   0   'False
               Top             =   1800
               Width           =   4215
            End
            Begin VB.TextBox txt_fon_ant 
               BackColor       =   &H00FFFFFF&
               Height          =   285
               Left            =   8040
               MaxLength       =   8
               TabIndex        =   48
               TabStop         =   0   'False
               Top             =   1080
               Width           =   1455
            End
            Begin VB.TextBox txt_diG_MAD 
               Enabled         =   0   'False
               Height          =   285
               Left            =   2160
               MaxLength       =   1
               TabIndex        =   43
               TabStop         =   0   'False
               Top             =   360
               Width           =   255
            End
            Begin VB.Image Image1 
               Height          =   480
               Left            =   9600
               Picture         =   "Form_ficha.frx":2B0BC
               Stretch         =   -1  'True
               ToolTipText     =   "Rescata los Datos de Apoderado para la Madre"
               Top             =   2040
               Width           =   600
            End
            Begin VB.Label lbl_emp_cel_ant 
               Caption         =   "Celular"
               Height          =   255
               Left            =   120
               TabIndex        =   226
               Top             =   2160
               Width           =   2415
            End
            Begin VB.Label Label8 
               Caption         =   "Ciudad"
               Height          =   255
               Left            =   120
               TabIndex        =   203
               Top             =   1080
               Width           =   975
            End
            Begin VB.Label lbl_no1_ant 
               Caption         =   "Nombre Completo Madre"
               Height          =   255
               Left            =   2520
               TabIndex        =   201
               Top             =   360
               Width           =   2295
            End
            Begin VB.Label lbl_emp_fon_ant 
               Caption         =   "Fono Trabajo"
               Height          =   255
               Left            =   6960
               TabIndex        =   136
               Top             =   1800
               Width           =   975
            End
            Begin VB.Label lbl_emp_ant 
               Caption         =   "Empresa Donde Trabaja"
               Height          =   255
               Left            =   120
               TabIndex        =   135
               Top             =   1800
               Width           =   2415
            End
            Begin VB.Label lbl_pro_ant 
               Caption         =   "Ocupación"
               Height          =   255
               Left            =   6960
               TabIndex        =   134
               Top             =   1440
               Width           =   975
            End
            Begin VB.Label lbl_niv_ant 
               Caption         =   "Nivel Educacional"
               Height          =   255
               Left            =   120
               TabIndex        =   133
               Top             =   1440
               Width           =   1695
            End
            Begin VB.Label lbl_rut_ant 
               Caption         =   "Rut"
               Height          =   255
               Left            =   120
               TabIndex        =   132
               Top             =   360
               Width           =   735
            End
            Begin VB.Label lbl_fon_ant 
               Caption         =   "Fono"
               Height          =   255
               Left            =   6960
               TabIndex        =   131
               Top             =   1080
               Width           =   1215
            End
            Begin VB.Label lbl_com_ant 
               Caption         =   "Comuna"
               Height          =   255
               Left            =   6960
               TabIndex        =   130
               Top             =   720
               Width           =   975
            End
            Begin VB.Label lbl_dir_ant 
               Caption         =   "Direccion"
               Height          =   255
               Left            =   120
               TabIndex        =   129
               Top             =   720
               Width           =   1215
            End
            Begin VB.Line Line3 
               X1              =   2040
               X2              =   2160
               Y1              =   480
               Y2              =   480
            End
         End
      End
      Begin VB.Frame Frame_ant 
         Caption         =   "IV ANTECEDENTES FAMILIARES"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   5535
         Left            =   -74760
         TabIndex        =   112
         Top             =   600
         Width           =   10695
         Begin VB.Frame frame_her_ant 
            Caption         =   "Hermanos"
            ForeColor       =   &H00FF0000&
            Height          =   3495
            Left            =   120
            TabIndex        =   119
            Top             =   1920
            Width           =   10455
            Begin MSFlexGridLib.MSFlexGrid Grd_Her_Ant 
               Height          =   1455
               Left            =   2280
               TabIndex        =   77
               TabStop         =   0   'False
               Top             =   1560
               Width           =   6615
               _ExtentX        =   11668
               _ExtentY        =   2566
               _Version        =   393216
               Cols            =   5
               FixedCols       =   0
               FormatString    =   "Apellido paterno     | Apellido materno     | Nombre                       | Fecha Nac. | Edad"
            End
            Begin VB.TextBox txt_contador 
               Height          =   285
               Left            =   1800
               Locked          =   -1  'True
               TabIndex        =   78
               TabStop         =   0   'False
               Top             =   2400
               Width           =   375
            End
            Begin VB.TextBox TXT_AM1_ANT 
               Height          =   285
               Left            =   2280
               MaxLength       =   25
               TabIndex        =   71
               TabStop         =   0   'False
               Top             =   720
               Width           =   1095
            End
            Begin VB.TextBox TXT_AP1_ANT 
               Height          =   285
               Left            =   7320
               MaxLength       =   25
               TabIndex        =   70
               TabStop         =   0   'False
               Top             =   360
               Width           =   1575
            End
            Begin VB.TextBox txt_no1_ant 
               Height          =   285
               Left            =   2280
               MaxLength       =   40
               TabIndex        =   69
               TabStop         =   0   'False
               Top             =   360
               Width           =   1815
            End
            Begin VB.TextBox txt_ed1_ant 
               Enabled         =   0   'False
               Height          =   285
               Left            =   2280
               MaxLength       =   2
               TabIndex        =   74
               TabStop         =   0   'False
               Top             =   1080
               Width           =   495
            End
            Begin VB.CommandButton BTN_ACE_ANT 
               Caption         =   "Agregar"
               Height          =   375
               Left            =   9000
               TabIndex        =   75
               TabStop         =   0   'False
               Top             =   1680
               Width           =   1215
            End
            Begin VB.CommandButton BTN_ELI_ANT 
               Caption         =   "Eliminar"
               Enabled         =   0   'False
               Height          =   375
               Left            =   9000
               TabIndex        =   76
               TabStop         =   0   'False
               Top             =   2280
               Width           =   1215
            End
            Begin MSComCtl2.DTPicker Dtp_fec_her 
               BeginProperty DataFormat 
                  Type            =   1
                  Format          =   "MM/dd/yyyy"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   2058
                  SubFormatType   =   3
               EndProperty
               Height          =   375
               Left            =   7320
               TabIndex        =   72
               TabStop         =   0   'False
               Top             =   720
               Width           =   1575
               _ExtentX        =   2778
               _ExtentY        =   661
               _Version        =   393216
               MousePointer    =   4
               CustomFormat    =   "dd/mm/yyyy"
               Format          =   49479681
               CurrentDate     =   36526
               MaxDate         =   73415
               MinDate         =   16438
            End
            Begin VB.Label Label15 
               Caption         =   "Fecha de nacimiento"
               Height          =   255
               Left            =   5400
               TabIndex        =   205
               Top             =   720
               Width           =   1935
            End
            Begin VB.Label LBL_AM1_ANT 
               Caption         =   "Apellido Materno"
               Height          =   255
               Left            =   240
               TabIndex        =   126
               Top             =   720
               Width           =   1575
            End
            Begin VB.Label LBL_AP1_ANT 
               Caption         =   "Apellido Paterno"
               Height          =   255
               Left            =   5400
               TabIndex        =   125
               Top             =   360
               Width           =   1695
            End
            Begin VB.Label lbl_nom_ant 
               Caption         =   "Nombre de Hermano"
               Height          =   255
               Left            =   240
               TabIndex        =   124
               Top             =   360
               Width           =   1935
            End
            Begin VB.Label lbl_ed1_ant 
               Caption         =   "Edad"
               Height          =   255
               Left            =   240
               TabIndex        =   123
               Top             =   1080
               Width           =   495
            End
            Begin VB.Label Label4 
               Caption         =   "Hermanos"
               Height          =   255
               Left            =   240
               TabIndex        =   122
               Top             =   1560
               Width           =   1215
            End
            Begin VB.Label Label10 
               Caption         =   "Total Hermanos"
               Height          =   255
               Left            =   240
               TabIndex        =   121
               Top             =   2400
               Width           =   1455
            End
            Begin VB.Label lbl_her_ant 
               Height          =   255
               Left            =   2280
               TabIndex        =   120
               Top             =   2280
               Width           =   1575
            End
         End
         Begin VB.Frame frame_ant_ant 
            Caption         =   "Antecedentes Familiares"
            ForeColor       =   &H00FF0000&
            Height          =   1455
            Left            =   120
            TabIndex        =   113
            Top             =   240
            Width           =   10455
            Begin VB.TextBox txt_ing_ant 
               Height          =   285
               Left            =   2280
               MaxLength       =   8
               TabIndex        =   68
               TabStop         =   0   'False
               Top             =   1080
               Width           =   1575
            End
            Begin VB.ComboBox cmb_pro_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2B4FE
               Left            =   7320
               List            =   "Form_ficha.frx":2B50E
               TabIndex        =   67
               TabStop         =   0   'False
               Text            =   "cmb_pro_ant"
               Top             =   720
               Width           =   1575
            End
            Begin VB.ComboBox cmb_cas_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2B53B
               Left            =   2280
               List            =   "Form_ficha.frx":2B548
               TabIndex        =   66
               TabStop         =   0   'False
               Text            =   "cmb_cas_ant"
               Top             =   720
               Width           =   1575
            End
            Begin VB.ComboBox cmb_alu_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2B566
               Left            =   7320
               List            =   "Form_ficha.frx":2B579
               TabIndex        =   65
               TabStop         =   0   'False
               Text            =   "cmb_alu_ant"
               Top             =   360
               Width           =   1575
            End
            Begin VB.ComboBox cmb_pad_ant 
               Height          =   315
               ItemData        =   "Form_ficha.frx":2B5B0
               Left            =   2280
               List            =   "Form_ficha.frx":2B5BD
               TabIndex        =   64
               TabStop         =   0   'False
               Text            =   "cmb_pad_ant"
               Top             =   360
               Width           =   1575
            End
            Begin VB.Label lbl_cas_ant 
               Caption         =   "Casa"
               Height          =   255
               Left            =   5400
               TabIndex        =   118
               Top             =   720
               Width           =   855
            End
            Begin VB.Label lbl_ing_ant 
               Caption         =   "Ingreso Familiar           $"
               Height          =   255
               Left            =   240
               TabIndex        =   117
               Top             =   1080
               Width           =   2055
            End
            Begin VB.Label Label7 
               Caption         =   "El Grupo Familiar Vive"
               Height          =   255
               Left            =   240
               TabIndex        =   116
               Top             =   720
               Width           =   1695
            End
            Begin VB.Label lbl_pad_ant 
               Caption         =   "Padres Estan"
               Height          =   255
               Left            =   240
               TabIndex        =   115
               Top             =   360
               Width           =   1335
            End
            Begin VB.Label lbl_alu_ant 
               Caption         =   "Alumno Vive Con"
               Height          =   255
               Left            =   5400
               TabIndex        =   114
               Top             =   360
               Width           =   1215
            End
         End
      End
      Begin VB.Frame Frame_apo 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   4815
         Left            =   -74760
         TabIndex        =   98
         Top             =   1320
         Width           =   10695
         Begin VB.ComboBox cmb_par_apo 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2B5DC
            Left            =   7800
            List            =   "Form_ficha.frx":2B5F8
            TabIndex        =   36
            TabStop         =   0   'False
            Text            =   "cmb_par_apo"
            Top             =   2520
            Width           =   2535
         End
         Begin VB.TextBox txt_emp_apo 
            Height          =   285
            Left            =   7800
            MaxLength       =   25
            TabIndex        =   38
            TabStop         =   0   'False
            Top             =   2880
            Width           =   2535
         End
         Begin VB.ComboBox cmb_reg_apo 
            Enabled         =   0   'False
            Height          =   315
            ItemData        =   "Form_ficha.frx":2B644
            Left            =   7800
            List            =   "Form_ficha.frx":2B64B
            Style           =   1  'Simple Combo
            TabIndex        =   32
            Top             =   1320
            Width           =   2535
         End
         Begin VB.ComboBox cmb_niv_apo 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2B652
            Left            =   2640
            List            =   "Form_ficha.frx":2B677
            TabIndex        =   35
            TabStop         =   0   'False
            Text            =   "cmb_niv_apo"
            Top             =   2520
            Width           =   2775
         End
         Begin VB.ComboBox cmb_com_apo 
            Enabled         =   0   'False
            Height          =   315
            ItemData        =   "Form_ficha.frx":2B76C
            Left            =   2640
            List            =   "Form_ficha.frx":2B76E
            TabIndex        =   31
            TabStop         =   0   'False
            Text            =   "cmb_com_apo"
            Top             =   1320
            Width           =   2775
         End
         Begin VB.TextBox txt_cel_apo 
            Height          =   285
            Left            =   7800
            MaxLength       =   12
            TabIndex        =   34
            TabStop         =   0   'False
            Top             =   1680
            Width           =   1455
         End
         Begin VB.ComboBox cmb_tip_apo 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2B770
            Left            =   7800
            List            =   "Form_ficha.frx":2B772
            TabIndex        =   41
            TabStop         =   0   'False
            Text            =   "cmb_tip_apo"
            Top             =   3960
            Width           =   1935
         End
         Begin VB.ComboBox cmb_con_apo 
            Height          =   315
            ItemData        =   "Form_ficha.frx":2B774
            Left            =   2640
            List            =   "Form_ficha.frx":2B776
            TabIndex        =   40
            TabStop         =   0   'False
            Text            =   "cmb_con_apo"
            Top             =   3960
            Width           =   1935
         End
         Begin VB.TextBox TXT_APP_APO 
            Height          =   285
            Left            =   2640
            MaxLength       =   20
            TabIndex        =   28
            TabStop         =   0   'False
            Top             =   600
            Width           =   2775
         End
         Begin VB.TextBox txt_nom_Apo 
            Height          =   285
            Left            =   2640
            MaxLength       =   30
            TabIndex        =   27
            TabStop         =   0   'False
            Top             =   240
            Width           =   2775
         End
         Begin VB.TextBox txt_dir_apo 
            Height          =   285
            Left            =   2640
            MaxLength       =   40
            TabIndex        =   30
            TabStop         =   0   'False
            Top             =   960
            Width           =   2775
         End
         Begin VB.TextBox txt_apm_apo 
            Height          =   285
            Left            =   7800
            MaxLength       =   20
            TabIndex        =   29
            TabStop         =   0   'False
            Top             =   600
            Width           =   2535
         End
         Begin VB.TextBox txt_pro_apo 
            Height          =   285
            Left            =   2640
            MaxLength       =   25
            TabIndex        =   37
            TabStop         =   0   'False
            Top             =   2880
            Width           =   2775
         End
         Begin VB.TextBox txt_fon_emp_apo 
            Height          =   285
            Left            =   2640
            MaxLength       =   8
            TabIndex        =   39
            TabStop         =   0   'False
            Top             =   3240
            Width           =   1215
         End
         Begin VB.TextBox txt_fon_apo 
            Height          =   285
            Left            =   2640
            MaxLength       =   8
            TabIndex        =   33
            TabStop         =   0   'False
            Top             =   1680
            Width           =   1215
         End
         Begin VB.Label LBL_EMP_apo 
            Caption         =   "Empresa donde Trabaja"
            Height          =   255
            Left            =   5520
            TabIndex        =   200
            Top             =   2880
            Width           =   2295
         End
         Begin VB.Label LBL_reg_apo 
            Caption         =   "Region"
            Height          =   255
            Left            =   5880
            TabIndex        =   161
            Top             =   1320
            Width           =   2055
         End
         Begin VB.Line Line8 
            BorderColor     =   &H80000005&
            X1              =   15
            X2              =   10680
            Y1              =   3735
            Y2              =   3735
         End
         Begin VB.Line Line7 
            BorderColor     =   &H80000005&
            X1              =   15
            X2              =   10680
            Y1              =   2295
            Y2              =   2295
         End
         Begin VB.Line Line6 
            BorderColor     =   &H80000010&
            X1              =   15
            X2              =   10680
            Y1              =   2280
            Y2              =   2280
         End
         Begin VB.Line Line5 
            BorderColor     =   &H80000010&
            X1              =   15
            X2              =   10680
            Y1              =   3720
            Y2              =   3720
         End
         Begin VB.Label lbl_cel_apo 
            Caption         =   "Celular"
            Height          =   255
            Left            =   5880
            TabIndex        =   111
            Top             =   1680
            Width           =   1095
         End
         Begin VB.Label lbl_tip_apo 
            Caption         =   "Tipo de Apoderado"
            Height          =   255
            Left            =   5520
            TabIndex        =   110
            Top             =   3960
            Width           =   1935
         End
         Begin VB.Label lbl_con 
            Caption         =   "Convenio"
            Height          =   255
            Left            =   240
            TabIndex        =   109
            Top             =   3960
            Width           =   1335
         End
         Begin VB.Label LBL_APP_APO 
            Caption         =   "Apellido Paterno"
            Height          =   255
            Left            =   240
            TabIndex        =   108
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label lbl_nom_apo 
            Caption         =   "Nombres"
            Height          =   255
            Left            =   240
            TabIndex        =   107
            Top             =   240
            Width           =   1095
         End
         Begin VB.Label lbl_dir_apo 
            Caption         =   "Direccion"
            Height          =   255
            Left            =   240
            TabIndex        =   106
            Top             =   960
            Width           =   1095
         End
         Begin VB.Label lbl_niv_apo 
            Caption         =   "Nivel Educacional"
            Height          =   255
            Left            =   240
            TabIndex        =   105
            Top             =   2520
            Width           =   2295
         End
         Begin VB.Label LBL_APM_apo 
            Caption         =   "Apellido Materno"
            Height          =   255
            Left            =   5880
            TabIndex        =   104
            Top             =   600
            Width           =   1575
         End
         Begin VB.Label lbl_com_apo 
            Caption         =   "Comuna"
            Height          =   255
            Left            =   240
            TabIndex        =   103
            Top             =   1320
            Width           =   1335
         End
         Begin VB.Label lbl_pro_apo 
            Caption         =   "Ocupación"
            Height          =   255
            Left            =   240
            TabIndex        =   102
            Top             =   2880
            Width           =   1095
         End
         Begin VB.Label lbl_par_apo 
            Caption         =   "Parentesco Alumno"
            Height          =   255
            Left            =   5520
            TabIndex        =   101
            Top             =   2520
            Width           =   1455
         End
         Begin VB.Label lbl_fon_emp_apo 
            Caption         =   "Fono Empresa"
            Height          =   255
            Left            =   240
            TabIndex        =   100
            Top             =   3240
            Width           =   1455
         End
         Begin VB.Label lbl_fon_apo 
            Caption         =   "Fono"
            Height          =   255
            Left            =   240
            TabIndex        =   99
            Top             =   1800
            Width           =   1455
         End
      End
      Begin VB.Frame frame_ins 
         Caption         =   "VII DATOS DE INSCRIPCION"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   3135
         Left            =   2520
         TabIndex        =   146
         Top             =   1320
         Width           =   5775
         Begin VB.CommandButton Command1 
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   4080
            Picture         =   "Form_ficha.frx":2B778
            Style           =   1  'Graphical
            TabIndex        =   234
            ToolTipText     =   "Ver Fechas Disponibles"
            Top             =   1920
            Width           =   375
         End
         Begin VB.TextBox txt_enc_alu 
            BackColor       =   &H00FFFFFF&
            Enabled         =   0   'False
            Height          =   285
            Left            =   2640
            MaxLength       =   30
            TabIndex        =   88
            TabStop         =   0   'False
            Top             =   1080
            Width           =   2775
         End
         Begin MSComCtl2.DTPicker DTP_FEC_INS 
            CausesValidation=   0   'False
            Height          =   375
            Left            =   2640
            TabIndex        =   87
            TabStop         =   0   'False
            Top             =   360
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   661
            _Version        =   393216
            Format          =   49479681
            CurrentDate     =   36526
         End
         Begin MSComCtl2.DTPicker DTP_FEC_EVA 
            CausesValidation=   0   'False
            Height          =   375
            Left            =   2640
            TabIndex        =   89
            TabStop         =   0   'False
            Top             =   1680
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   661
            _Version        =   393216
            Format          =   49479681
            CurrentDate     =   36526
         End
         Begin MSComCtl2.DTPicker DTP_HOR_EVA 
            CausesValidation=   0   'False
            BeginProperty DataFormat 
               Type            =   1
               Format          =   "hh:mm:ss AMPM"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2058
               SubFormatType   =   4
            EndProperty
            Height          =   375
            Left            =   2640
            TabIndex        =   90
            TabStop         =   0   'False
            Top             =   2280
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   661
            _Version        =   393216
            CustomFormat    =   "HH:MM 'Hrs.'"
            Format          =   49479682
            UpDown          =   -1  'True
            CurrentDate     =   36494.3333333333
         End
         Begin VB.Label lbl_eva_alu 
            Caption         =   "Fecha  de Evaluacion Diagnóstica"
            Height          =   495
            Left            =   240
            TabIndex        =   150
            Top             =   1680
            Width           =   2295
         End
         Begin VB.Label lbl_enc_alu 
            Caption         =   "Nombre Encargado"
            Height          =   375
            Left            =   240
            TabIndex        =   149
            Top             =   1080
            Width           =   1935
         End
         Begin VB.Label lbl_fec_ins_alu 
            Caption         =   "Fecha de Inscripcion"
            Height          =   255
            Left            =   240
            TabIndex        =   148
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label3 
            Caption         =   "Hora de Evaluacion Diagnóstica"
            Height          =   495
            Left            =   240
            TabIndex        =   147
            Top             =   2280
            Width           =   2295
         End
      End
      Begin VB.Label Label17 
         Caption         =   "Datos del Apoderado"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   -74760
         TabIndex        =   225
         Top             =   720
         Width           =   3255
      End
      Begin VB.Label lbl_rut_apo 
         Caption         =   "Rut"
         Height          =   255
         Left            =   -74520
         TabIndex        =   224
         Top             =   1080
         Width           =   1095
      End
      Begin VB.Line Line1 
         X1              =   -71280
         X2              =   -71160
         Y1              =   1200
         Y2              =   1200
      End
   End
   Begin VB.Label lbl_info 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   480
      TabIndex        =   238
      Top             =   7080
      Width           =   9735
   End
   Begin VB.Label Label6 
      Caption         =   " "
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   10560
      TabIndex        =   96
      Top             =   360
      Width           =   1215
   End
   Begin VB.Label Label5 
      Caption         =   " "
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   10440
      TabIndex        =   95
      Top             =   3960
      Width           =   1095
   End
   Begin VB.Label lbl_mem 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   11055
   End
End
Attribute VB_Name = "Form_ficha"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Joralu As String
Dim ahermanos(10, 6) As String ' Array donde almaceno los datos de los hermanos para consultar
Dim aalumnos() As String
Dim serial As Integer
Dim hermanosya As Integer
Dim totalhnos As Integer
Dim fechainscrip As Date
Dim errorapellidos, agno_label, agno_label_ant As Integer
Dim Anhopostulacion, Anhopostulacion2, Anhopostulacion3 As String
Dim strDatApo(20) As String
Dim ApoNew As Boolean
Dim Primera As Boolean
Dim pasopor As Boolean
Dim pasoonoal As Boolean
Dim ant_docher As Integer
Dim logher As Boolean
Public hayapo As Boolean

Private Sub Genera_Reporte()
    Dim rsConn As ADODB.Recordset
    Dim strRunApo As String, strRunAlu As String, strNewRun As String
    Dim Pagado As Long, PorPagar As Long, Fecha As Variant
    Set rsConn = New ADODB.Recordset
    strNewRun = Me.txt_rut_apo & "-" & Me.txt_dig_apo
    strRunAlu = Me.txt_rut_alu.Text & "-" & Me.txT_dig_alu
    strRunApo = strDatApo(0) & "-" & strDatApo(1)
    'Pregunto si es Un registro Nuevo o es edicion de apoderado
    If strDatApo(0) = "" Then
        conn.Execute ("REPLACE INTO hist_apo_alu (run_apo, run_alu,  fech_inic) VALUES ( '" & strNewRun & "','" & strRunAlu & "','" & Format(Date$, "yyyy-mm-dd") & "')")
        conn.Execute ("REPLACE INTO hist_apoderado (run_apo, ape_pat,ape_mat,nombres) VALUES ('" & strNewRun & "','" & Me.TXT_APP_APO & "','" & Me.txt_apm_apo & "','" & Me.txt_nom_Apo & "')")
    Else
        conn.Execute ("UPDATE hist_apo_alu SET fech_fin = '" & Format(Date$, "YYYY-MM-DD") & "' WHERE run_apo='" & strRunApo & "' and run_alu='" & strRunAlu & "' and ISNULL(fech_fin)")
        conn.Execute ("REPLACE INTO hist_apo_alu (run_apo, run_alu,  fech_inic) VALUES ( '" & strNewRun & "','" & strRunAlu & "','" & Format(Date$, "yyyy-mm-dd") & "')")
        conn.Execute ("REPLACE INTO hist_apoderado (run_apo, ape_pat,ape_mat,nombres) VALUES ('" & strNewRun & "','" & Me.TXT_APP_APO & "','" & Me.txt_apm_apo & "','" & Me.txt_nom_Apo & "')")
        Set rsConn = conn.Execute("SELECT folio_mens, run_apo, fech_venc, estado_mens FROM fnza_mensualidad where run_apo='" & strRunApo & "' order by fech_venc")
        Pagado = 0
        If Not rsConn.EOF Then
            Do While Not rsConn.EOF
                If rsConn("estado_mens") = "impg" Then
                    rsConn.MoveNext
                    Exit Do
                End If
                rsConn.MoveNext
                Fecha = Format(rsConn("fech_venc"), "yyyy-mm-dd")
            Loop
            'Fecha = Format(rsConn("fech_venc"), "yyyy-mm-dd")
            rsConn.Close
            Set rsConn = conn.Execute("SELECT * FROM fnza_letras WHERE fech_venc > '" & Fecha & "' AND RUN_APO='" & strRunApo & "'")
            If Not rsConn.EOF Then
                'Anulo las letras
                conn.Execute ("UPDATE fnza_letras SET estado_ltra ='anul' WHERE fech_venc >= '" & Fecha & "' AND RUN_APO='" & strRunApo & "'")
                rsConn.Close
                'Actualizo las definiciones de mensualidades del apoderado
                'Esta operacion esta caduca por el hecho de que es erronea.
                'conn.Execute ("UPDATE fnza_mensualidad SET run_apo='" & strNewRun & "' WHERE fech_venc >= '" & Fecha & "' AND RUN_APO='" & strRunApo & "' ")
                
                'Imprimo reporte de letras anuladas
                Form_main.CrystalReport.ReplaceSelectionFormula ("")
                Form_main.CrystalReport.ReportFileName = App.Path & "\RPT\ca_let_apo.rpt"
                Form_main.CrystalReport.ReplaceSelectionFormula ("{fnza_letras.RUN_APO}='" & strRunApo & "' AND {fnza_letras.FECH_VENC} >= Date(" & Year(Fecha) & "," & Month(Fecha) & "," & Day(Fecha) & ")")
                Form_main.CrystalReport.Destination = crptToPrinter
                Form_main.CrystalReport.Action = 1
                'Imprimo reporte de cupones pendientes
                Form_main.CrystalReport.ReplaceSelectionFormula ("{apoderados.RUT_APO}='" & strNewRun & "'")
                Form_main.CrystalReport.ReportFileName = App.Path & "\rpt\ca_cup_pen.rpt"
                Form_main.CrystalReport.Action = 1
                'Limpio crystal
                Form_main.CrystalReport.ReplaceSelectionFormula ("")
                Form_main.CrystalReport.ReportFileName = ""
                Call LimpiaFormulas(Form_main.CrystalReport, 20)
            Else
                rsConn.Close
            End If
            
        Else
            rsConn.Close
            MsgBox "No olvide definir las mensualidades y cuponeras para el nuevo apoderado de este alumno" & vbCrLf & "el apoderado anterior no registra mensualidades definidas ni pagadas", vbOKOnly + vbInformation, "Faltan mensualidades"
        End If
        Set rsConn = Nothing
    End If
    
End Sub

Private Sub BTN_ACE_ANT_Click()
If Len(Trim(Me.txt_no1_ant.Text)) <> 0 And Len(Trim(Me.TXT_AP1_ANT.Text)) <> 0 And Len(Trim(Me.TXT_AM1_ANT.Text)) <> 0 Then
    If Me.Dtp_fec_her.Value > Date Then
        MsgBox ("Fecha de nacimiento del hermano(a) no puede ser mayor a fecha actual.")
        Me.Dtp_fec_her.SetFocus
        Exit Sub
    Else
        Rut_ALu = txt_rut_alu + "-" + txT_dig_alu
        If Me.Grd_Her_Ant.Rows = 2 And Me.Grd_Her_Ant.Text = "" Then
            Me.Grd_Her_Ant.Row = 1
        ElseIf Me.Grd_Her_Ant.Rows = 2 And Me.Grd_Her_Ant.Text <> "" Then
            Me.Grd_Her_Ant.Rows = Me.Grd_Her_Ant.Rows + 1
            Me.Grd_Her_Ant.Row = Me.Grd_Her_Ant.Rows - 1
        ElseIf Me.Grd_Her_Ant.Rows > 2 Then
            Me.Grd_Her_Ant.Rows = Me.Grd_Her_Ant.Rows + 1
            Me.Grd_Her_Ant.Row = Me.Grd_Her_Ant.Rows - 1
        End If
        Me.Grd_Her_Ant.Col = 0
        Me.Grd_Her_Ant.Text = Me.txt_no1_ant.Text
        Me.Grd_Her_Ant.Col = 1
        Me.Grd_Her_Ant.Text = Me.TXT_AP1_ANT.Text
        Me.Grd_Her_Ant.Col = 2
        Me.Grd_Her_Ant.Text = Me.TXT_AM1_ANT.Text
        Me.Grd_Her_Ant.Col = 3
        Me.Grd_Her_Ant.Text = Me.Dtp_fec_her.Value
        Me.Grd_Her_Ant.Col = 4
        Me.Grd_Her_Ant.Text = Me.txt_ed1_ant.Text
    
        txt_no1_ant.Text = ""                         ' Elimina el cuadro de texto
        TXT_AP1_ANT.Text = ""
        TXT_AM1_ANT.Text = ""
        txt_ed1_ant.Text = ""
        txt_no1_ant.SetFocus                          ' Establece de nuevo el foco en el cuadro de texto.
        
        Me.txt_contador.Text = Grd_Her_Ant.Rows - 1
        lbl_her_ant.Caption = Grd_Her_Ant.Rows  ' Muestra el número de elementos en el cuadro de lista.
        lbl_her_ant.Caption = lbl_her_ant.Caption + " " + "HERMANOS"
    End If
Else
    MsgBox ("No deben haber campos vacíos")
    Me.txt_no1_ant.SetFocus
End If
End Sub

Private Sub btn_ace_opc_Click()
On Error GoTo Controlerror:
    Dim CodRegOpe As String
    Dim Fecha As Date
    If Cmd_nac_alu = "SI" Then nac_alu = "1"
    If Cmd_nac_alu = "NO" Then nac_alu = "2"
    If txT_dig_alu.Text <> digito(txt_rut_alu.Text) Then
        Me.SSTab1.Tab = 0
        Me.txT_dig_alu.SetFocus
        SendKeys "{home}+{end}"
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        Exit Sub
    End If
    
    Codens = devuelvecampo("codigos_ensenanza", "", "cod_ens", "des_ens ='" & Me.Cmb_mod_cur.Text & "'", conn)
    Ngrado = Me.cmb_cur_ins.Text
    Joralu = devuelvecampo("jornadas", "", "cod_jor", "des_jor = '" & Me.Cmb_jor_alu.Text & "'", conn)
    '******************************************
    '   Parametrizar el año de proceso.....
    '******************************************
    Anho = Anno
    'Anhopostulacion = str(agno_label)
    If pasopor Then
        Anhopostulacion3 = Anhopostulacion
    Else
        Anhopostulacion3 = Anhopostulacion2
    End If
    If ExistReg("vac_x_nivel", "cod_ens = '" & Codens & "' and num_gra ='" & Ngrado & "' and cod_jor = '" & Joralu & "' and agno = " & Anhopostulacion3, conn) Then
        vacantes = devuelvecampo("vac_x_nivel", "", "dis_vac", "cod_ens = '" & Codens & "' and num_gra ='" & Ngrado & "' and cod_jor = '" & Joralu & "' and agno = " & Anhopostulacion3, conn)
        If vacantes < 0 Then
            MsgBox ("No hay vacantes para este curso")
            Me.SSTab1.Tab = 0
            Me.Cmb_mod_cur.SetFocus
            Exit Sub
        End If
    Else
        MsgBox ("No hay información sobre vacantes para" & Chr(13) & "este curso. Sírvase a ingresarlas.")
        Me.SSTab1.Tab = 0
        Me.Cmb_mod_cur.SetFocus
        Exit Sub
    End If
        Fecha = "6/30/" & Anhopostulacion3
    
    If Len(Trim(Me.txt_app_alu.Text)) = 0 Then SSTab1.Tab = 0: Call validatexto(txt_app_alu, "Ingrese Apellido Paterno del Postulante"): Exit Sub
    If Len(Trim(Me.txt_apm_alu.Text)) = 0 Then SSTab1.Tab = 0: Call validatexto(txt_apm_alu, "Ingrese Apellido Materno del Postulante"): Exit Sub
    If Len(Trim(Me.txt_nom_alu.Text)) = 0 Then SSTab1.Tab = 0: Call validatexto(txt_nom_alu, "Ingrese Apellido Nombres del Postulante"): Exit Sub
    If Len(Trim(Me.txt_rut_alu.Text)) = 0 Then SSTab1.Tab = 0: Call validatexto(txt_rut_alu, "Ingrese Rut del Postulante"): Exit Sub
    
    If Len(Trim(Me.txt_dir_alu.Text)) = 0 Then SSTab1.Tab = 0: Call validatexto(txt_dir_alu, "Ingrese Dirección del Postulante"): Exit Sub
    If Len(Trim(Me.txt_fon_alu.Text)) = 0 Then SSTab1.Tab = 0: Call validatexto(txt_fon_alu, "Ingrese Fono del Postulante"): Exit Sub
    
    If Not Rut_Apo_Ok Then SSTab1.Tab = 1: Call validatexto(txt_rut_apo, "Ingrese Rut del Apoderado"): Exit Sub
    
    If Len(Trim(Me.txt_rut_apo.Text)) = 0 Then SSTab1.Tab = 1: Call validatexto(txt_rut_apo, "Ingrese Rut del Apoderado"): Exit Sub
    
    If Len(Trim(Me.txt_nom_Apo.Text)) = 0 Then SSTab1.Tab = 1: Call validatexto(txt_nom_Apo, "Ingrese Nombre del Apoderado"): Exit Sub
    If Len(Trim(Me.TXT_APP_APO.Text)) = 0 Then
        SSTab1.Tab = 1
        Call validatexto(TXT_APP_APO, "Ingrese Apellido Paterno del Apoderado")
        Exit Sub
    Else
    If Me.cmb_par_apo.Text = "Madre" Then
        If Trim(Me.txt_apm_alu.Text) <> Trim(Me.TXT_APP_APO.Text) Then
            If MsgBox("No hay relación de apellidos entre Madre e Hijo" & Chr(13) & chr13 & Chr(13) & "Apellido Madre ->  " & Me.TXT_APP_APO.Text & Chr(13) & "Apellido Hijo     ->  " & Me.txt_apm_alu.Text & Chr(13) & Chr(13) & "Corrija el apellido que corresponda" & Chr(13) & "o verifique la opción de parentesco." & Chr(13) & Chr(13) & "¿Desea continuar?", vbYesNo + vbQuestion) = vbNo Then
                'Me.TXT_APP_APO.Text = Me.txt_apm_alu.Text
                SSTab1.Tab = 1
                Me.TXT_APP_APO.SetFocus
                SendKeys "{home}+{end}"
                Exit Sub
            End If
        End If
    ElseIf Me.cmb_par_apo.Text = "Padre" Then
        If Trim(Me.txt_app_alu.Text) <> Trim(Me.TXT_APP_APO.Text) Then
            If MsgBox("No hay relación de apellidos entre Padre e Hijo" & Chr(13) & chr13 & Chr(13) & "Apellido Padre ->  " & Me.TXT_APP_APO.Text & Chr(13) & "Apellido Hijo     ->  " & Me.txt_app_alu.Text & Chr(13) & Chr(13) & "Corrija el apellido que corresponda" & Chr(13) & "o verifique la opción de parentesco." & Chr(13) & Chr(13) & "¿Desea continuar?", vbYesNo + vbQuestion) = vbNo Then
                'Me.TXT_APP_APO.Text = Me.txt_app_alu.Text
                SSTab1.Tab = 1
                Me.TXT_APP_APO.SetFocus
                SendKeys "{home}+{end}"
                Exit Sub
            End If
        End If
    End If
    End If
    If Len(Trim(Me.txt_apm_apo.Text)) = 0 Then SSTab1.Tab = 1: Call validatexto(txt_apm_apo, "Ingrese Apellido Materno del Apoderado "): Exit Sub
    If Len(Trim(Me.txt_dir_apo.Text)) = 0 Then SSTab1.Tab = 1: Call validatexto(txt_dir_apo, "Ingrese Dirección del Apoderado"): Exit Sub
    If Len(Trim(Me.txt_fon_apo.Text)) = 0 Then SSTab1.Tab = 1: Call validatexto(txt_fon_apo, "Ingrese Fono del Apoderado"): Exit Sub
    If Len(Trim(Me.cmb_niv_apo.Text)) = 0 Then SSTab1.Tab = 1: MsgBox ("Ingrese Nivel Educacional del Apoderado"): Me.cmb_niv_apo.Enabled = True: Me.cmb_niv_apo.SetFocus: Exit Sub
    If Len(Trim(Me.cmb_par_apo.Text)) = 0 Then SSTab1.Tab = 1: MsgBox ("Ingrese Parentesco del Apoderado"): Me.cmb_par_apo.Enabled = True: Me.cmb_par_apo.SetFocus: Exit Sub
    If Len(Trim(Me.txt_ing_ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_ing_ant, "Ingrese Monto de Ingreso Familiar"): Exit Sub
    'If Len(Trim(Me.txt_enc_alu.Text)) = 0 Then SSTab1.Tab = 6: Call validatexto(txt_enc_alu, "Ingrese Nombre del Encargado"): Exit Sub
    'If Me.DTP_FEC_EVA.Value < Me.DTP_FEC_INS Then SSTab1.Tab = 6: MsgBox ("Fecha de evaluación, no puede ser menor " & Chr(13) & "a fecha de inscripción"): Me.DTP_FEC_EVA.SetFocus: Exit Sub
    
    If Len(Trim(Me.txt_rut_ant.Text)) <> 0 Then
        If Len(Trim(Me.txt_mad_Ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_mad_Ant, "Ingrese Nombre de la Madre"): Exit Sub
        If Len(Trim(Me.txt_dir_ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_dir_ant, "Ingrese Dirección de la Madre"): Exit Sub
        
        If Len(Trim(Me.cmb_comu_ant.Text)) = 0 Then
            SSTab1.Tab = 2: MsgBox ("Ingrese Comuna de la Madre"): Me.cmb_comu_ant.Enabled = True: Me.cmb_comu_ant.SetFocus: Exit Sub
        ElseIf Len(Trim(Me.cmb_comu_ant.Text)) <> 0 And Not ExistReg("codigos__geograficos", "comuna = '" & Me.cmb_comu_ant.Text & "'", conn) Then
            SSTab1.Tab = 2: MsgBox ("Error en la Comuna de la Madre, sírvase a corregir"): Me.cmb_comu_ant.Enabled = True: Me.cmb_comu_ant.SetFocus: Exit Sub
        End If
        
        If Len(Trim(Me.txt_fon_ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_fon_ant, "Ingrese Fono de la Madre"): Exit Sub
        If Len(Trim(Me.cmb_niv_ant.Text)) = 0 Then SSTab1.Tab = 2: MsgBox ("Ingrese Nivel Educacional de la Madre"): Me.cmb_niv_ant.Enabled = True: Me.cmb_niv_ant.SetFocus: Exit Sub
    Else
        If Len(Trim(Me.txt_mad_Ant.Text)) <> 0 Or Len(Trim(Me.txt_dir_ant.Text)) <> 0 Or Len(Trim(Me.txt_fon_ant.Text)) <> 0 Or Len(Trim(Me.cmb_niv_ant.Text)) <> 0 Or Len(Trim(Me.cmb_comu_ant.Text)) <> 0 Or Len(Trim(Me.cmb_reg_ant.Text)) <> 0 Or Len(Trim(Me.txt_pro_ant.Text)) <> 0 Or Len(Trim(Me.txt_emp_ant.Text)) <> 0 Or Len(Trim(Me.txt_emp_fon_ant.Text)) <> 0 Then
            If MsgBox("Rut de la Madre no se encuentra en ficha." & Chr(13) & chr13 & "¿Desea Continuar?", vbYesNo + vbQuestion) = vbYes Then
                Me.txt_diG_MAD = ""
                Me.txt_mad_Ant = ""
                Me.txt_dir_ant = ""
                Me.txt_fon_ant = ""
                Me.cmb_comu_ant = ""
                Me.cmb_reg_ant = ""
                Me.cmb_niv_ant = ""
                'Me.cmb_niv_ant.ListIndex = 5
                Me.txt_pro_ant = ""
                Me.txt_emp_ant = ""
                Me.txt_emp_fon_ant = ""
            Else
                SSTab1.Tab = 2
                Call validatexto(txt_rut_ant, "Ingrese rut de la Madre"): Exit Sub
            End If
        End If
    End If
    
    If Len(Trim(Me.txt_ru2_ant.Text)) <> 0 Then
        If Len(Trim(Me.txt_nom2_ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_nom2_ant, "Ingrese Nombre del Padre"): Exit Sub
        If Len(Trim(Me.txt_di2_ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_di2_ant, "Ingrese Dirección del Padre"): Exit Sub
        
        If Len(Trim(Me.cmb_comu2_ant.Text)) = 0 Then
            SSTab1.Tab = 2: MsgBox ("Ingrese Comuna del Padre"): Me.cmb_comu2_ant.Enabled = True: Me.cmb_comu2_ant.SetFocus: Exit Sub
        ElseIf Len(Trim(Me.cmb_comu2_ant.Text)) <> 0 And Not ExistReg("codigos__geograficos", "comuna = '" & Me.cmb_comu2_ant.Text & "'", conn) Then
            SSTab1.Tab = 2: MsgBox ("Error en la Comuna del Padre, sírvase a corregir"): Me.cmb_comu2_ant.Enabled = True: Me.cmb_comu2_ant.SetFocus: Exit Sub
        End If
        
        If Len(Trim(Me.txt_fo2_ant.Text)) = 0 Then SSTab1.Tab = 2: Call validatexto(txt_fo2_ant, "Ingrese Fono del Padre"): Exit Sub
        If Len(Trim(Me.cmb_ni2_ant.Text)) = 0 Then SSTab1.Tab = 2: MsgBox ("Ingrese Nivel Educacional del Padre"): Me.cmb_ni2_ant.Enabled = True: Me.cmb_ni2_ant.SetFocus: Exit Sub
    Else
        If Len(Trim(Me.txt_nom2_ant.Text)) <> 0 Or Len(Trim(Me.txt_di2_ant.Text)) <> 0 Or Len(Trim(Me.txt_fo2_ant.Text)) <> 0 Or Len(Trim(Me.cmb_ni2_ant.Text)) <> 0 Or Len(Trim(Me.cmb_comu2_ant.Text)) <> 0 Or Len(Trim(Me.cmb_reg2_ant.Text)) <> 0 Or Len(Trim(Me.txT_pr2_ant.Text)) <> 0 Or Len(Trim(Me.txt_em2_ant.Text)) <> 0 Or Len(Trim(Me.txt_emp_fo2_ant.Text)) <> 0 Then
            If MsgBox("Rut del Padre no se encuentra en ficha." & Chr(13) & chr13 & "¿Desea Continuar?", vbYesNo + vbQuestion) = vbYes Then
                Me.txt_dig_pad = ""
                Me.txt_nom2_ant = ""
                Me.txt_di2_ant = ""
                Me.txt_fo2_ant = ""
                Me.cmb_comu2_ant = ""
                Me.cmb_reg2_ant = ""
                Me.cmb_ni2_ant = ""
                'Me.cmb_ni2_ant.ListIndex = 5
                Me.txT_pr2_ant = ""
                Me.txt_em2_ant = ""
                Me.txt_emp_fo2_ant = ""
            Else
                SSTab1.Tab = 2
                Call validatexto(txt_ru2_ant, "Ingrese rut del Padre"): Exit Sub
            End If
        End If
    End If
    
    'La línea anterior durará hasta que el sistema asigne automáticamente el nombre de usuario


'On Error GoTo Controlerror
Rut_apo = Trim(txt_rut_apo) + "-" + Trim(txt_dig_apo)
Rut_ALu = Trim(txt_rut_alu) + "-" + Trim(txT_dig_alu)
If UCase(Me.cmb_sex_alu.Text) = "M" Then
    sexo_alu = "1"
ElseIf UCase(Me.cmb_sex_alu.Text) = "F" Then
    sexo_alu = "2"
End If
Set Rs_Pos = New ADODB.Recordset

Rs_Pos.CursorType = adOpenDynamic
Rs_Pos.LockType = adLockOptimistic
'Rs_Pos.Open "postulantes", conn, , , adCmdTable

Set Rs_Apo = New ADODB.Recordset
Rs_Apo.CursorType = adOpenDynamic
Rs_Apo.LockType = adLockOptimistic
'Rs_Apo.Open "apoderados", conn, , , adCmdTable
Rs_Apo.CursorLocation = adUseClient
Rs_Pos.CursorLocation = adUseClient
conn.BeginTrans

If ExistReg("postulantes", "ci_alu ='" & Rut_ALu & "'", conn) Then
    CodRegOpe = "MOD"
    txt_rut_alu.Enabled = False
    txT_dig_alu.Enabled = False

    'Transacción Editando alumno
                       
            If ExistReg("apoderados", "rut_apo ='" & Rut_apo & "'", conn) Then
                
                txt_rut_apo.Enabled = False
                txt_dig_apo.Enabled = False
                'Editando Apoderado
                Rs_Apo.Open "SELECT * FROM apoderados where " & "rut_apo ='" & Rut_apo & "'", conn
                'Rs_Apo!rut_apo = rut_apo
                Rs_Apo!cod_tipo_apo = devuelvecampo("tipo_apo", "", "cod_tipo_apo", "des_tipo_apo ='" & cmb_tip_apo & "'", conn)
                Rs_Apo!Noms_Apo = Trim(txt_nom_Apo)
                Rs_Apo!ape1_apo = Trim(TXT_APP_APO)
                Rs_Apo!ape2_apo = Trim(txt_apm_apo)
                
                Rs_Apo!Dir_Apo = Trim(txt_dir_apo)
                Rs_Apo!comuna_apo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_com_apo & "'", conn)
                Rs_Apo!fon_c_apo = Trim(txt_fon_apo)
                Rs_Apo!cel_apo = Trim(txt_cel_apo)
                Rs_Apo!nivel_educ_apo = Trim(cmb_niv_apo)
                Rs_Apo!profesio_apo = Trim(txt_pro_apo)
                Rs_Apo!empresa = Trim(txt_emp_apo)
                Rs_Apo!empresa_fon = Trim(txt_fon_emp_apo)
                Rs_Apo!cod_conv = devuelvecampo("CONVENIOS", "", "COD_CONV", "DES_CONV ='" & cmb_con_apo & "'", conn)
                Rs_Apo.Update
                Rs_Apo.Close
                'FIN Editando Apoderado
                
            Else
                '******* 1 *******
                'Guardando Apoderado
                Rs_Apo.Open "apoderados", conn, , , adCmdTable
                Rs_Apo.AddNew
                Rs_Apo!Rut_apo = Trim(Rut_apo)
                Rs_Apo!cod_tipo_apo = devuelvecampo("tipo_apo", "", "cod_tipo_apo", "des_tipo_apo ='" & cmb_tip_apo & "'", conn)
                Rs_Apo!Noms_Apo = Trim(txt_nom_Apo)
                Rs_Apo!ape1_apo = Trim(TXT_APP_APO)
                Rs_Apo!ape2_apo = Trim(txt_apm_apo)
                
                
                Rs_Apo!Dir_Apo = Trim(txt_dir_apo)
                Rs_Apo!comuna_apo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_com_apo & "'", conn)
                Rs_Apo!fon_c_apo = Trim(txt_fon_apo)
                Rs_Apo!cel_apo = Trim(txt_cel_apo)
                Rs_Apo!nivel_educ_apo = Trim(cmb_niv_apo)
                Rs_Apo!profesio_apo = Trim(txt_pro_apo)
                Rs_Apo!empresa = Trim(txt_emp_apo)
                Rs_Apo!empresa_fon = Trim(txt_fon_emp_apo)
                Rs_Apo!cod_conv = devuelvecampo("CONVENIOS", "", "COD_CONV", "DES_CONV ='" & cmb_con_apo & "'", conn)
                Rs_Apo.Update
                Rs_Apo.Close
                '***** FIN Guardar apoderado ******
  
                     
            End If
        
            varregion = Me.cmb_reg_alu.Text
            varcomuna = Me.cmb_com_alu.Text
            codigogeo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna = '" & Me.cmb_com_alu.Text & "' and provincia = '" & Me.cmb_reg_alu.Text & "'", conn)
            modalidad = devuelvecampo("codigos_ensenanza", "des_ens", "cod_ens", "des_ens = '" & Me.Cmb_mod_cur.Text & "'", conn)
            
            '******* 2 *******
            'Editando alumno

            Rs_Pos.Open "SELECT * FROM postulantes where " & "ci_alu ='" & Rut_ALu & "'", conn
            'Rs_Pos!ci_alu = rut_alu
            Rs_Pos!ape_pat_alu = Trim(txt_app_alu)
            Rs_Pos!ape_mat_alu = Trim(txt_apm_alu)
            Rs_Pos!Nom_Alu = Trim(txt_nom_alu)
            Rs_Pos!cod_jor = Joralu 'Trim(Me.Cmb_jor_alu.Text)
            Rs_Pos!cod_geo = codigogeo
            Rs_Pos!fec_nacalu = dtp_fec_alu
            Rs_Pos!SEX_ALU = sexo_alu
            Rs_Pos!DIRE_ALU = Trim(txt_dir_alu)
            Rs_Pos!fon_alu = Trim(txt_fon_alu)
            Rs_Pos!enfermedades_alu = Trim(txt_enf_alu)
            Rs_Pos!tratamiento_alu = Trim(txt_tra_alu)
            Rs_Pos!col_procedencia_alu = Trim(txt_pro_alu)
            Rs_Pos!alergico_a_alu = Trim(txt_ale_alu)
            
            
            If cmb_exi_alu = "Si" Then Rs_Pos!exime_rel_alu = True
            If cmb_exi_alu = "No" Then Rs_Pos!exime_rel_alu = False
            
            If cmb_exi_alu = "Si" Then Rs_Pos!exime_rel_alu = True
            If cmb_exi_alu = "No" Then Rs_Pos!exime_rel_alu = False
            
            Rs_Pos!fon_emergencia_alu = Trim(txt_fon_eme_alu)
            Rs_Pos!ind_ext_alu = nac_alu 'Me.Cmd_nac_alu.Text
            Rs_Pos!contacto_emergencia_alu = Trim(txt_eme_alu)
            '******* 3 *******
            'Datos del Padre
            Rs_Pos!nom_pad_alu = Trim(txt_nom2_ant)
            Rs_Pos!dir_pad_alu = Trim(txt_di2_ant)
            ' Debo indicar si hay padre ingresado, si es así ejecutar esto, de lo contrario ver que hacer
            Rs_Pos!comuna_pad_alu = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_comu2_ant & "'", conn)
            Rs_Pos!fon_pad_alu = Trim(txt_fo2_ant)
            Rs_Pos!rut_pad_alu = Trim(txt_ru2_ant) & "-" & Trim(txt_dig_pad)
            Rs_Pos!nivel_educ_pad_alu = Trim(cmb_ni2_ant)
            Rs_Pos!profesion_pad_alu = Trim(txT_pr2_ant)
            Rs_Pos!empresa_pad_alu = Trim(txt_em2_ant)
            Rs_Pos!empresa_fon_pad_alu = Trim(txt_emp_fo2_ant)
            Rs_Pos!cel_pad_alu = Trim(txt_emp_cel2_ant.Text)
            'Datos de la Madre
            Rs_Pos!nom_mad_alu = Trim(txt_mad_Ant)
            Rs_Pos!dir_mad_alu = Trim(txt_dir_ant)
            Rs_Pos!comuna_mad_alu = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_comu_ant & "'", conn)
            Rs_Pos!fon_mad_alu = Trim(txt_fon_ant)
            Rs_Pos!rut_mad_alu = Trim(txt_rut_ant) & "-" & Trim(txt_diG_MAD)
            Rs_Pos!nivel_educ_mad_alu = Trim(cmb_niv_ant)
            Rs_Pos!profesion_mad_alu = Trim(txt_pro_ant.Text)
            Rs_Pos!empresa_mad_alu = Trim(txt_emp_ant.Text)
            Rs_Pos!empresa_fon_mad_alu = Trim(txt_emp_fon_ant)
            Rs_Pos!cel_mad_alu = Trim(txt_emp_cel_ant.Text)
            '******* 4 *******
            Rs_Pos!est_pad = cmb_pad_ant
            Rs_Pos!alu_viv_con = cmb_alu_ant
            Rs_Pos!grupo_viv_en = cmb_cas_ant
            Rs_Pos!SIT_CAS = cmb_pro_ant
            Rs_Pos!ing_fam = Val(Trim(txt_ing_ant))
            '******* 5 *******
            Rs_Pos!v_cer_nac = Che_cer_doc
            Rs_Pos!v_inf_not_par = che_inf_doc
            Rs_Pos!v_cer_est_ult_cur = che_par_doc
            Rs_Pos!v_fotos = che_fot_doc
            If che_doc_her.Value = 0 Then
                Rs_Pos!ind_hermano = "NO"
            ElseIf che_doc_her.Value = 1 Then
                Rs_Pos!ind_hermano = "SI"
            ElseIf che_doc_her.Value = 2 Then
                Rs_Pos!ind_hermano = "NO"
            End If
            If che_doc_her.Value = ant_docher Then
                logher = False
            Else
                logher = True
            End If
            '******* 6 *******
            If cmb_sol_ant = "Si" Then Rs_Pos!VI_sol_car_esc = True
            If cmb_sol_ant = "No" Then Rs_Pos!VI_sol_car_esc = False
            
            If cmb_com_ant = "Si" Then Rs_Pos!VI_for_exi_rel = True
            If cmb_com_ant = "No" Then Rs_Pos!VI_for_exi_rel = False
            Rs_Pos!ind_embarazo = Mid(Me.Cmb_embarazo, 1, 1)
            Rs_Pos!indigena = Mid(Me.Cmb_indigena, 1, 1)
            '******* 7 *******
            Rs_Pos!VII_fec_ins = DTP_FEC_INS
            Rs_Pos!VII_nom_encargado = Trim(txt_enc_alu)
            
            Rs_Pos!Cod_Ens = modalidad
            Rs_Pos!Num_Gra = cmb_cur_ins

            Rs_Pos.Update
            Rs_Pos.Close
            
            If logher Then
                Dim logescribe As ADODB.Recordset
                
                If ant_docher = 1 Then
                    sther = "SI"
                Else
                    sther = "NO"
                End If
                
                If che_doc_her.Value = 1 Then
                    stnher = "SI"
                Else
                    stnher = "NO"
                End If
            
                Set logescribe = New ADODB.Recordset
                logescribe.Open "insert into hist_docherm set ci_alu='" & Rut_ALu & "', movimiento='Se ha cambiado de " & sther & " a " & stnher & " por el usuario id " & Nom_usu_ses & " de nombre " & Nom_com_usu_ses & " en el Computador con nombre usuario " & Environ$("USERNAME") & ", PC " & Environ$("COMPUTERNAME") & "',responsable='" & Nom_usu_ses & "',fecha='" & Format(Now, "yyyy-mm-dd Hh:Nn:Ss") & "'", conn
               
                
            End If
                
                
        

'Fin Transacción Editando Alumno
Else

'Transacción Guardando alumno

    If MsgBox("El registro no existe. ¿Desea crearlo?", vbYesNo + vbQuestion) = vbYes Then
            CodRegOpe = "AGR"
            
            If ExistReg("apoderados", "rut_apo ='" & Rut_apo & "'", conn) Then
            'Editando Apoderado
                txt_rut_apo.Enabled = False
                txt_dig_apo.Enabled = False
    
                Rs_Apo.Open "SELECT * FROM apoderados where " & "rut_apo ='" & Rut_apo & "'", conn
                'Rs_Apo!rut_apo = rut_apo
                
                
                Rs_Apo!cod_tipo_apo = devuelvecampo("tipo_apo", "", "cod_tipo_apo", "des_tipo_apo = '" & Me.cmb_tip_apo.Text & "'", conn)
                Rs_Apo!Noms_Apo = Trim(txt_nom_Apo)
                Rs_Apo!ape1_apo = Trim(TXT_APP_APO)
                Rs_Apo!ape2_apo = Trim(txt_apm_apo)
                
                Rs_Apo!Dir_Apo = Trim(txt_dir_apo)
                Rs_Apo!comuna_apo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna = '" & Me.cmb_com_apo.Text & "' and provincia = '" & Me.cmb_reg_apo.Text & "'", conn)
                Rs_Apo!fon_c_apo = Trim(txt_fon_apo)
                Rs_Apo!cel_apo = Trim(txt_cel_apo)
                Rs_Apo!nivel_educ_apo = Trim(cmb_niv_apo)
                Rs_Apo!profesio_apo = Trim(txt_pro_apo)
                Rs_Apo!empresa = Trim(txt_emp_apo)
                Rs_Apo!empresa_fon = Trim(txt_fon_emp_apo)
                Rs_Apo!cod_conv = devuelvecampo("CONVENIOS", "", "COD_CONV", "DES_CONV ='" & cmb_con_apo & "'", conn)
                Rs_Apo.Update
                Rs_Apo.Close
             'FIN Editando Apoderado

            
            Else
                '******* 1 *******
                'Guardando Apoderado en Apoderados
                Rs_Apo.Open "apoderados", conn, , , adCmdTable
                Rs_Apo.AddNew
                Rs_Apo!Rut_apo = Rut_apo
                Rs_Apo!cod_tipo_apo = devuelvecampo("tipo_apo", "", "cod_tipo_apo", "des_tipo_apo ='" & cmb_tip_apo & "'", conn)
                Rs_Apo!Noms_Apo = Trim(txt_nom_Apo)
                Rs_Apo!ape1_apo = Trim(TXT_APP_APO)
                Rs_Apo!ape2_apo = Trim(txt_apm_apo)
                Rs_Apo!Dir_Apo = Trim(txt_dir_apo)
                Rs_Apo!comuna_apo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_com_apo & "'", conn)
                Rs_Apo!fon_c_apo = Trim(txt_fon_apo)
                Rs_Apo!cel_apo = Trim(txt_cel_apo)
                Rs_Apo!nivel_educ_apo = Trim(cmb_niv_apo)
                Rs_Apo!profesio_apo = Trim(txt_pro_apo)
                Rs_Apo!empresa = Trim(txt_emp_apo)
                Rs_Apo!empresa_fon = Trim(txt_fon_emp_apo)
                Rs_Apo!cod_conv = devuelvecampo("CONVENIOS", "", "COD_CONV", "DES_CONV ='" & cmb_con_apo & "'", conn)
                Rs_Apo.Update
                Rs_Apo.Close
                '***** FIN Guardar apoderado em Apoderados******
  
                     
            End If
            
            varregion = Me.cmb_reg_alu.Text
            varcomuna = Me.cmb_com_alu.Text
            'Rs_Pos!Cod_GEo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna = '" & Me.cmb_com_alu.Text & "' and provincia = '" & Me.cmb_reg_alu.Text & "'")
            codigogeo = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna = '" & Me.cmb_com_alu.Text & "' and provincia = '" & Me.cmb_reg_alu.Text & "'", conn)
            modalidad = devuelvecampo("codigos_ensenanza", "des_ens", "cod_ens", "des_ens = '" & Me.Cmb_mod_cur.Text & "'", conn)
            
            '******* 2 *******
            'Guardando alumno en Postulantes
            Rs_Pos.Open "postulantes", conn, , , adCmdTable
            Rs_Pos.AddNew
            Rs_Pos!Ci_alu = Trim(Rut_ALu)
            Rs_Pos!ape_pat_alu = Trim(txt_app_alu)
            Rs_Pos!ape_mat_alu = Trim(txt_apm_alu)
            Rs_Pos!Nom_Alu = Trim(txt_nom_alu)
            Rs_Pos!cod_jor = Joralu 'Trim(Me.Cmb_jor_alu.Text)
            Rs_Pos!cod_geo = codigogeo
            Rs_Pos!fec_nacalu = dtp_fec_alu
            Rs_Pos!SEX_ALU = sexo_alu
            Rs_Pos!DIRE_ALU = Trim(txt_dir_alu)
            Rs_Pos!fon_alu = Trim(txt_fon_alu)
            Rs_Pos!enfermedades_alu = Trim(txt_enf_alu)
            Rs_Pos!tratamiento_alu = Trim(txt_tra_alu)
            Rs_Pos!col_procedencia_alu = Trim(txt_pro_alu)
            Rs_Pos!alergico_a_alu = Trim(txt_ale_alu)
            
            
            If cmb_exi_alu = "Si" Then Rs_Pos!exime_rel_alu = True
            If cmb_exi_alu = "No" Then Rs_Pos!exime_rel_alu = False
            
            If cmb_exi_alu = "Si" Then Rs_Pos!exime_rel_alu = True
            If cmb_exi_alu = "No" Then Rs_Pos!exime_rel_alu = False
            
            Rs_Pos!fon_emergencia_alu = Trim(txt_fon_eme_alu)
            Rs_Pos!ind_ext_alu = nac_alu 'Trim(Cmd_nac_alu)
            Rs_Pos!contacto_emergencia_alu = Trim(txt_eme_alu)
            '******* 3 *******
            'Datos del Padre
            Rs_Pos!nom_pad_alu = Trim(txt_nom2_ant)
            Rs_Pos!dir_pad_alu = Trim(txt_di2_ant)
                       
            Rs_Pos!comuna_pad_alu = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_comu2_ant & "'", conn)
            Rs_Pos!fon_pad_alu = Trim(txt_fo2_ant)
            Rs_Pos!rut_pad_alu = Trim(txt_ru2_ant) & "-" & Trim(txt_dig_pad)
            Rs_Pos!nivel_educ_pad_alu = Trim(cmb_ni2_ant)
            Rs_Pos!profesion_pad_alu = Trim(txT_pr2_ant)
            Rs_Pos!empresa_pad_alu = Trim(txt_em2_ant)
            Rs_Pos!empresa_fon_pad_alu = Trim(txt_emp_fo2_ant)
            Rs_Pos!cel_pad_alu = Trim(txt_emp_cel2_ant.Text)
            
            'Datos de la Madre
            Rs_Pos!nom_mad_alu = Trim(txt_mad_Ant)
            Rs_Pos!dir_mad_alu = Trim(txt_dir_ant)
            
            Rs_Pos!comuna_mad_alu = devuelvecampo("codigos__geograficos", "", "cod_geo", "comuna ='" & cmb_comu_ant & "'", conn)
            Rs_Pos!fon_mad_alu = Trim(txt_fon_ant)
            Rs_Pos!rut_mad_alu = Trim(txt_rut_ant) & "-" & Trim(txt_diG_MAD)
            Rs_Pos!nivel_educ_mad_alu = Trim(cmb_niv_ant)
            Rs_Pos!profesion_mad_alu = Trim(txt_pro_ant.Text)
            Rs_Pos!empresa_mad_alu = Trim(txt_emp_ant.Text)
            Rs_Pos!empresa_fon_mad_alu = Trim(txt_emp_fon_ant)
            Rs_Pos!cel_mad_alu = Trim(txt_emp_cel_ant.Text)
            
            '******* 4 *******
            Rs_Pos!est_pad = cmb_pad_ant
            Rs_Pos!alu_viv_con = cmb_alu_ant
            Rs_Pos!grupo_viv_en = cmb_cas_ant
            Rs_Pos!SIT_CAS = cmb_pro_ant
            Rs_Pos!ing_fam = Val(Trim(txt_ing_ant))
            '******* 5 *******
            Rs_Pos!v_cer_nac = Che_cer_doc
            Rs_Pos!v_inf_not_par = che_inf_doc
            Rs_Pos!v_cer_est_ult_cur = che_par_doc
            Rs_Pos!v_fotos = che_fot_doc
            If che_doc_her.Value = 0 Then
                Rs_Pos!ind_hermano = "NO"
                sther = "NO"
            ElseIf che_doc_her.Value = 1 Then
                Rs_Pos!ind_hermano = "SI"
                sther = "SI"
            ElseIf che_doc_her.Value = 2 Then
                Rs_Pos!ind_hermano = "NO"
                sther = "NO"
            End If
            
            '******* 6 *******
            If cmb_sol_ant = "Si" Then Rs_Pos!VI_sol_car_esc = True
            If cmb_sol_ant = "No" Then Rs_Pos!VI_sol_car_esc = False
            
            If cmb_com_ant = "Si" Then Rs_Pos!VI_for_exi_rel = True
            If cmb_com_ant = "No" Then Rs_Pos!VI_for_exi_rel = False
            Rs_Pos!ind_embarazo = Mid(Me.Cmb_embarazo, 1, 1)
            Rs_Pos!indigena = Mid(Me.Cmb_indigena, 1, 1)
            '******* 7 *******
            'Rs_Pos!VII_fec_ins = DTP_FEC_INS
            Rs_Pos!VII_nom_encargado = Trim(txt_enc_alu)
            Rs_Pos!Cod_Ens = modalidad
            Rs_Pos!Num_Gra = cmb_cur_ins
            Rs_Pos!matriculado_alu = 0

            Rs_Pos.Update
            Rs_Pos.Close
            
            Set logescribe = New ADODB.Recordset
            logescribe.Open "insert into hist_docherm set ci_alu='" & Rut_ALu & "', movimiento='Ha iniciado con valor " & sther & " el usuario id " & Nom_usu_ses & " de nombre " & Nom_com_usu_ses & " en el Computador con nombre Usuario " & Environ$("USERNAME") & ", PC " & Environ$("COMPUTERNAME") & "',responsable='" & Nom_usu_ses & "',fecha='" & Format(Now, "yyyy-mm-dd Hh:Nn:Ss") & "'", conn
                
            '****** Fin Guardar Alumno en Postulantes*******
          
    Else
        conn.RollbackTrans
        Exit Sub
    
    End If ' fin msgbox

End If
            conn.Execute "delete from hermanos where ci_alu = '" & Rut_ALu & "'"
            For t = 1 To totalhnos
                conn.Execute "INSERT INTO hermanos (ci_alu, serial_her, nom_her, fec_nac_her, ape_pat_her, ape_mat_her) values('" & Trim(ahermanos(t, 1)) & "' , '" & Trim(ahermanos(t, 2)) & "' , '" & Trim(ahermanos(t, 3)) & "' , '" & InvierteFecha(Trim(ahermanos(t, 6)), "R") & "' , '" & Trim(ahermanos(t, 4)) & "' , '" & Trim(ahermanos(t, 5)) & "'" & ")"
            Next t
    
            If Not ExistReg("APO_X_ALU", "rut_apo ='" & Rut_apo & "' AND CI_ALU ='" & Rut_ALu & "' and agno = " & Anhopostulacion, conn) Then
                conn.Execute "INSERT INTO APO_X_ALU(RUT_APO, CI_ALU, PARENT_APO, AGNO ) values('" & Rut_apo & "','" & Rut_ALu & "','" & Me.cmb_par_apo.Text & "'," & Anhopostulacion & ")"
            Else
                conn.Execute "UPDATE APO_X_ALU Set PARENT_APO = '" & Me.cmb_par_apo.Text & "' where ci_alu = '" & Rut_ALu & "' And rut_apo = '" & Rut_apo & "' and agno = " & Anhopostulacion
            End If
            
            'If Rut_Ini_Apo <> Rut_apo Then
            '    conn.Execute "Delete from apo_x_alu where rut_apo = '" & Rut_Ini_Apo & "' and ci_alu = '" & Rut_ALu & "'"
            '    If CuentaReg("apo_x_alu", "rut_apo ='" & Rut_Ini_Apo & "'", conn) = 0 Then
            '        conn.Execute "Delete from apoderados where rut_apo = '" & Rut_Ini_Apo & "'"
            '    End If
            'End If
            
            'hora = Right(DTP_HOR_EVA.Value, 8)
            Dim tiempocom As String
            'Dim tiempo2 As Date
            tiempocom = Format(Me.DTP_FEC_EVA.Value, "yyyy-mm-dd") & " " & Format(Me.DTP_HOR_EVA.Value, "HH:MM:SS")
          '  MsgBox tiempocom
            'tiempo2 = CDate(tiempocom)
            'Anhopostulacion = Trim(str(agno_label))
            If Not ExistReg("POSTULACIONES", "CI_ALU ='" & Rut_ALu & "' AND FEC_POS ='" & InvierteFecha(fechainscrip, "R") & "'", conn) Then
               ' CAMBIOS POR CAMBIOS DE FORMATO ELIMINANDO VII_FEC_EVAL conn.Execute "INSERT INTO POSTULACIONES(CI_ALU, FEC_POS, VII_FEC_EVAL, VII_HOR_EVAL, COD_JOR, ANNO_POS_ALU, VIII_SIT_FIN_ALU ) values('" & Rut_ALu & "', '" & InvierteFecha(DTP_FEC_INS, "R") & "', '" & InvierteFecha(DTP_FEC_EVA, "R") & "', '" & hora & "', '" & Joralu & "', '" & Anhopostulacion & "','P')"
               conn.Execute "INSERT INTO POSTULACIONES(CI_ALU, FEC_POS, VII_HOR_EVAL, COD_JOR, ANNO_POS_ALU, VIII_SIT_FIN_ALU ) values('" & Rut_ALu & "', '" & InvierteFecha(DTP_FEC_INS, "R") & "', '" & tiempocom & "', '" & Joralu & "', '" & Anhopostulacion & "','P')"
            Else
                
                'conn.Execute "UPDATE postulaciones Set VII_hor_eval = '" & hora & "', vii_fec_eval = '" & InvierteFecha(Me.DTP_FEC_EVA.Value, "R") & "' , fec_pos = '" & InvierteFecha(DTP_FEC_INS.Value, "R") & "', COD_JOR = '" & Joralu & "', ANNO_POS_ALU = '" & Anhopostulacion & "'where ci_alu = '" & Rut_ALu & "' And fec_pos = '" & InvierteFecha(fechainscrip, "R") & "'"
                conn.Execute "UPDATE postulaciones Set VII_hor_eval = '" & tiempocom & "' , fec_pos = '" & InvierteFecha(DTP_FEC_INS.Value, "R") & "', COD_JOR = '" & Joralu & "', ANNO_POS_ALU = '" & Anhopostulacion2 & "'where ci_alu = '" & Rut_ALu & "' And fec_pos = '" & InvierteFecha(fechainscrip, "R") & "'"
            End If
    
            If Anhopostulacion = Anno And Me.cmb_repitente.ListIndex = 0 Then ' si esto ocurre el combo de repitencia está activo y seleccionado como si
                If Not ExistReg("repitentes", "ci_alu ='" & Rut_ALu & "' and cod_ens = '" & modalidad & "' and num_gra = '" & Me.cmb_cur_ins.Text & "' and anno_rep ='" & Anhopostulacion - 1 & "'", conn) Then
                    conn.Execute "INSERT INTO REPITENTES(CI_ALU, COD_ENS, NUM_GRA, ANNO_REP) values('" & Rut_ALu & "', '" & modalidad & "', '" & Me.cmb_cur_ins.Text & "', '" & Anhopostulacion - 1 & "')"
                End If
            ElseIf Anhopostulacion = Anno And Me.cmb_repitente.ListIndex = 1 Then ' si esto ocurre el combo de repitencia está activo y seleccionado como no
                If ExistReg("repitentes", "ci_alu ='" & Rut_ALu & "' and cod_ens = '" & modalidad & "' and num_gra = '" & Me.cmb_cur_ins.Text & "' and anno_rep ='" & Anhopostulacion - 1 & "'", conn) Then
                    conn.Execute "delete from REPITENTES where ci_alu ='" & Rut_ALu & "' and cod_ens = '" & modalidad & "' and num_gra = '" & Me.cmb_cur_ins.Text & "' and anno_rep ='" & Anhopostulacion - 1 & "'"
                End If
            End If
            'Actualiza IND_REP en ALU_X_CUR
            
            If Me.cmb_repitente.ListIndex = 0 Then ' si esto ocurre el combo de repitencia está activo y seleccionado como si
                If ExistReg("ALU_X_CUR", "CI_ALU ='" & Rut_ALu & "' AND COD_ENS ='" & Codens & "' AND ACTIVO_ALU ='SI' AND NUM_GRA ='" & Ngrado & "'", conn) Then
                   conn.Execute "UPDATE ALU_X_CUR Set IND_REP = '1' WHERE CI_ALU ='" & Rut_ALu & "' AND COD_ENS ='" & Codens & "' AND ACTIVO_ALU ='SI' AND NUM_GRA ='" & Ngrado & "' AND AGNO=" & Anhopostulacion
                End If
            ElseIf Me.cmb_repitente.ListIndex = 1 Then ' si esto ocurre el combo de repitencia está activo y seleccionado como no
                If ExistReg("ALU_X_CUR", "CI_ALU ='" & Rut_ALu & "' AND COD_ENS ='" & Codens & "' AND ACTIVO_ALU ='SI' AND NUM_GRA ='" & Ngrado & "'", conn) Then
                    conn.Execute "UPDATE ALU_X_CUR Set IND_REP = '2' WHERE CI_ALU ='" & Rut_ALu & "' AND COD_ENS ='" & Codens & "' AND ACTIVO_ALU ='SI' AND NUM_GRA ='" & Ngrado & "' AND AGNO=" & Anhopostulacion
                End If
            End If
            
            '********** Registro de operaciones ***********
             Call RegOpe(CodRegOpe, Trim(Left("FICHA@" & Rut_ALu & "@" & Me.txt_app_alu & " " & txt_apm_alu & " " & Me.txt_nom_alu & String(100, " "), 100)), conn)
            '********** FIN Registro de operaciones ***********

    conn.CommitTrans
    
    ' #########################################
    ' Reparo Relaciones de Apoderados en Fnzas.
    '
    RepararApoderadoFnza conn
    '
    ' #########################################

    If strDatApo(0) <> Me.txt_rut_apo Or strDatApo(1) <> Me.txt_dig_apo Then
        Genera_Reporte
        For i = 0 To 20: strDatApo(i) = "": Next
    End If


Unload Me
Load Form_ficha
Primera = True
Exit Sub
Controlerror:
    If MsgBox("Ha ocurrido el siguiente error:" & vbCrLf & vbCrLf & Err.Description & vbCrLf & Err.Source & vbCrLf & Err.Number & vbCrLf & vbCrLf & "¿Desea volver a intentarlo?", vbRetryCancel + vbExclamation, "ERROR AL GUARDAR") = vbRetry Then
        Resume
    Else
        MsgBox "Operación abortada", vbExclamation + vbOKOnly, "ABORTADO"
        Exit Sub
    End If
End Sub

Private Sub btn_aceptar_anho_Click()

If Me.opt_anho_select(0).Value = True Then
    agno_label = Year(Date)
    Anhopostulacion = Trim(str(agno_label))
ElseIf Me.opt_anho_select(1).Value = True Then
    agno_label = Year(Date) + 1
    Anhopostulacion = Trim(str(agno_label))
End If

If Me.opt_anho_select_ant(0).Value = True Then
    agno_label_ant = Year(Date)
    Anhopostulacion2 = Trim(str(agno_label_ant))
ElseIf Me.opt_anho_select(1).Value = True Then
    agno_label_ant = Year(Date) + 1
    Anhopostulacion2 = Trim(str(agno_label_ant))
End If

    
Me.lbl_mem.Caption = "FICHA DE POSTULACIÓN E INSCRIPCIÓN " + Anhopostulacion
Anhopostulacion3 = Anhopostulacion
Me.SSTab1.Enabled = True
'Me.frame_alu.Enabled = True
'Me.Frame_apo.Enabled = True
'Me.Frame_pad.Enabled = True
'Me.Frame_ant.Enabled = True
'Me.Frame_doc_alu.Enabled = True
'Me.frame_otro_ant.Enabled = True
'Me.frame_ins.Enabled = True
Me.BTN_CAMBIA_ANHO.Visible = True
Me.frame_anho.Visible = False
Me.frame_sombra.Visible = False
Me.Cmb_mod_cur.Enabled = True

End Sub

Private Sub btn_anterior_1_Click()
SSTab1.Tab = 0
End Sub

Private Sub btn_anterior_2_Click()
SSTab1.Tab = 1
End Sub

Private Sub btn_anterior_3_Click()
SSTab1.Tab = 2
End Sub

Private Sub btn_anterior_4_Click()
SSTab1.Tab = 3
End Sub

Private Sub btn_anterior_5_Click()
SSTab1.Tab = 4
End Sub

Private Sub btn_anterior_6_Click()
SSTab1.Tab = 5
End Sub

Private Sub btn_cam_apo_Click()
    If MsgBox("El siguiente proceso requiere estar conectado a una impresora, pues obtiene detalle de procesos a seguir") = vbOK Then
        Rut_Apo_Ok = False
        strDatApo(0) = Me.txt_rut_apo: strDatApo(1) = Me.txt_dig_apo
        strDatApo(2) = Me.txt_nom_Apo: strDatApo(3) = Me.TXT_APP_APO
        strDatApo(4) = Me.txt_apm_apo: strDatApo(5) = Me.txt_dir_apo
        strDatApo(6) = Me.cmb_reg_apo: strDatApo(7) = Me.cmb_com_apo
        strDatApo(8) = Me.txt_fon_apo: strDatApo(9) = Me.txt_cel_apo
        strDatApo(10) = Me.cmb_niv_apo: strDatApo(11) = Me.cmb_par_apo
        strDatApo(12) = Me.txt_pro_apo: strDatApo(13) = Me.txt_emp_apo
        strDatApo(14) = Me.txt_fon_emp_apo: strDatApo(15) = Me.cmb_con_apo
        strDatApo(16) = Me.cmb_tip_apo
        
        Me.txt_rut_apo = "": Me.txt_dig_apo = ""
        Me.txt_nom_Apo = "": Me.TXT_APP_APO = "": Me.txt_apm_apo = ""
        Me.txt_dir_apo = "": Me.cmb_reg_apo = "": Me.cmb_com_apo = ""
        Me.txt_fon_apo = "": Me.txt_cel_apo = ""
        Me.cmb_niv_apo = "": Me.cmb_par_apo = ""
        Me.txt_pro_apo = "": Me.txt_emp_apo = "": Me.txt_fon_emp_apo = ""
        Me.cmb_con_apo = "": Me.cmb_tip_apo = ""
        Me.Frame_apo.Enabled = False
        Me.btn_sgte_1.Enabled = False
        Me.txt_rut_apo.Enabled = True
        Me.txt_dig_apo.Enabled = False
        Me.txt_rut_apo.SetFocus
    End If
End Sub

Private Sub BTN_CAMBIA_ANHO_Click()
    Me.SSTab1.Enabled = False
    'Me.frame_alu.Enabled = False
    'Me.Frame_apo.Enabled = False
    'Me.Frame_pad.Enabled = False
    'Me.Frame_ant.Enabled = False
    'Me.Frame_doc_alu.Enabled = False
    'Me.frame_otro_ant.Enabled = False
    'Me.frame_ins.Enabled = False
    Me.frame_anho.Visible = True
    Me.frame_sombra.Visible = True
    'If Anhopostulacion = Anno Then
     '   Me.opt_anho_select(0).Value = True
      '  Me.opt_anho_select(0).SetFocus
   ' ElseIf Anhopostulacion = str(Val(Anno) + 1) Then
    '    Me.opt_anho_select(1).Value = True
     '   Me.opt_anho_select(1).SetFocus
    'Else
     '   Me.opt_anho_select(0).Value = True
      '  Me.opt_anho_select(0).SetFocus
   ' End If
End Sub

Private Sub btn_can_0_Click()
Unload Me
End Sub

Private Sub btn_can_1_Click()
Unload Me
End Sub

Private Sub btn_can_2_Click()
Unload Me
End Sub

Private Sub btn_can_3_Click()
Unload Me
End Sub

Private Sub btn_can_4_Click()
Unload Me
End Sub

Private Sub btn_can_5_Click()
Unload Me
End Sub

Private Sub btn_can_opc_Click()
Unload Me
End Sub

Private Sub btn_cerrar_Click()
    Me.frmFecEval.Visible = False
    SSTab1.Enabled = True
    If pasoonoal = False Then
        btn_ace_opc.Enabled = False
        Me.DTP_FEC_EVA.Enabled = False
        Me.DTP_HOR_EVA.Enabled = False
    Else
        btn_ace_opc.Enabled = True
        Me.DTP_FEC_EVA.Enabled = True
        Me.DTP_HOR_EVA.Enabled = True
    End If
End Sub

Private Sub BTN_ELI_ANT_Click()
If Me.txt_contador.Text = "0" Then
    MsgBox ("No hay registros que pueda eliminar")
Else
    If MsgBox("El registro  será eliminado. ¿Desea continuar?", vbYesNo + vbQuestion) = vbYes Then
        Dim Ind As Integer
        If Me.Grd_Her_Ant.Rows >= 0 And Me.Grd_Her_Ant.Row > 1 And Me.Grd_Her_Ant.Text <> "" Then                            ' Hay que asegurarse que una lista de elementos está seleccionada.
            Me.Grd_Her_Ant.RemoveItem (Me.Grd_Her_Ant.Row) ' Elimina el elemento del cuadro de lista.
            'lbl_her_ant.Caption =     ' Muestra el número de elementos en el cuadro de lista.
        ElseIf Me.Grd_Her_Ant.Rows = 2 And Me.Grd_Her_Ant.Row = 1 And Me.Grd_Her_Ant.Text <> "" Then                            ' Hay que asegurarse que una lista de elementos está seleccionada.
            Me.Grd_Her_Ant.Clear                                        ' Esto no debería ocurrir nunca, porque "Eliminar" está
            Me.Grd_Her_Ant.FormatString = "Apellido paterno     | Apellido materno     | Nombre                       | Fecha Nac. | Edad"
        Else
            Me.Grd_Her_Ant.RemoveItem (Me.Grd_Her_Ant.Row)
        End If                                          ' siempre deshabilitado si no hay una entrada seleccionada.
        ' Deshabilitar el botón "Eliminar" si no hay entradas seleccionadas en el cuadro de lista.
        
        'al indice se le debe sumar una para que coincida con la serial
        If Me.Grd_Her_Ant.Rows >= 1 And Me.Grd_Her_Ant.Text = "" Then
            Me.txt_contador.Text = 0
        Else
            Me.txt_contador.Text = Grd_Her_Ant.Rows - 1
        End If
        Me.txt_no1_ant.SetFocus
    End If
End If
End Sub

Private Sub btn_otro_alumno_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub btn_otro_alumno2_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub btn_otro_alumno3_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub btn_otro_alumno4_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub btn_otro_alumno5_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub btn_otro_alumno6_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub btn_otro_alumno7_Click()
Unload Me
Load Form_ficha
End Sub

Private Sub Btn_sgte_0_Click()
    SSTab1.TabVisible(1) = True
    SSTab1.Tab = 1
    If Not hayapo Then
        Me.txt_rut_apo.Enabled = True
        Me.txt_rut_apo.SetFocus
    End If
End Sub

Private Sub btn_sgte_1_Click()
'If Me.txt_rut_apo <> "" And Me.txt_dig_apo <> "" Then
    Select Case Me.cmb_par_apo.Text
        Case "Padre"
            Me.txt_rut_ant.Enabled = True
            Me.txt_rut_ant.SetFocus
            Image2_Click
        Case "Madre"
            Me.txt_ru2_ant.Enabled = True
            Me.txt_ru2_ant.SetFocus
            Image1_Click
        Case ""
            MsgBox ("Seleccione Parentesco")
            Me.SSTab1.Tab = 1
            Me.cmb_par_apo.Enabled = True
            Me.cmb_par_apo.SetFocus
            Exit Sub
        Case Else
            Me.txt_rut_ant.Enabled = True
            Me.txt_rut_ant.SetFocus
    End Select

    SSTab1.TabVisible(2) = True
    SSTab1.Tab = 2
    Me.btn_anterior_2.Enabled = True
    Me.btn_sgte_2.Enabled = True
'Else
'    MsgBox ("Ingrese Rut del apoderado")
'    Me.txt_rut_apo.SetFocus
'    SendKeys "{home}+{end}"
'End If
End Sub


Private Sub btn_sgte_2_Click()
SSTab1.TabVisible(3) = True
SSTab1.Tab = 3
Me.cmb_pad_ant.Enabled = True
Me.cmb_pad_ant.SetFocus
End Sub

Private Sub btn_sgte_3_Click()
    Dim t As Integer
    t = 1
    'serial = Me.lst_her_nom.ListCount
    If Me.Grd_Her_Ant.Text <> "" Then
        totalhnos = Me.Grd_Her_Ant.Rows - 1
    Else
        totalhnos = 0
    End If
    For t = 1 To totalhnos
        Me.Grd_Her_Ant.Row = t
        ahermanos(t, 1) = Me.txt_rut_alu.Text + "-" + Me.txT_dig_alu.Text 'rut de alumno titular
        ahermanos(t, 2) = t ' serial
        Me.Grd_Her_Ant.Col = 0
        ahermanos(t, 3) = Me.Grd_Her_Ant.Text 'nombre
        Me.Grd_Her_Ant.Col = 1
        ahermanos(t, 4) = Me.Grd_Her_Ant.Text ' apellido paterno
        Me.Grd_Her_Ant.Col = 2
        ahermanos(t, 5) = Me.Grd_Her_Ant.Text ' apellido materno
        Me.Grd_Her_Ant.Col = 3
        ahermanos(t, 6) = Me.Grd_Her_Ant.Text ' fecha de nacimiento
    Next t
    If SSTab1.Tab = 3 Then
        SSTab1.TabVisible(4) = True
        SSTab1.Tab = 4
        Me.Che_cer_doc.SetFocus
    End If
End Sub

Private Sub btn_sgte_4_Click()
SSTab1.TabVisible(5) = True
SSTab1.Tab = 5
Me.cmb_sol_ant.Enabled = True
Me.cmb_sol_ant.SetFocus
End Sub

Private Sub btn_sgte_5_Click()
    SSTab1.TabVisible(6) = True
    SSTab1.Tab = 6
    Me.DTP_FEC_INS.Enabled = True
    Me.DTP_FEC_INS.SetFocus
    If Busqueda = 1 Then
        Me.DTP_FEC_INS = Date
    End If
End Sub

Private Sub cmb_alu_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_alu_ant.Text) <> 0 Then
    Me.cmb_cas_ant.Enabled = True
    cmb_cas_ant.SetFocus
Else
    Me.cmb_alu_ant.SetFocus
End If
KeyAscii = 0

End Sub



Private Sub cmb_cas_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_cas_ant.Text) Then
    Me.cmb_pro_ant.Enabled = True
    cmb_pro_ant.SetFocus
Else
    Me.cmb_cas_ant.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_com_alu_Click()
cmb_reg_alu.Visible = True
cmb_reg_alu.ListIndex = Me.cmb_com_alu.ListIndex

End Sub

Private Sub cmb_com_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_com_alu.Text) <> 0 Then
    Me.txt_fon_alu.Enabled = True
    Me.txt_fon_alu.SetFocus
End If
KeyAscii = 0
End Sub



Private Sub cmb_com_ant_GotFocus()
If cmb_exi_alu.Text = "No" Then
    cmb_com_ant.Enabled = False
    cmb_com_ant.Text = "No"
    Me.Cmb_indigena.Enabled = True
    Me.Cmb_indigena.SetFocus
End If
End Sub

Private Sub cmb_com_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_com_ant.Text) <> 0 Then
    Me.Cmb_indigena.Enabled = True
    Me.Cmb_indigena.SetFocus
Else
    Me.cmb_com_ant.SetFocus
End If

End Sub

Private Sub cmb_com_apo_Click()
cmb_reg_apo.Visible = True
cmb_reg_apo.ListIndex = Me.cmb_com_apo.ListIndex
End Sub

Private Sub cmb_com_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_com_apo.Text) Then
    txt_fon_apo.Enabled = True
    txt_fon_apo.SetFocus
Else
    Me.cmb_com_apo.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_comu_ant_Click()
cmb_reg_ant.Visible = True
cmb_reg_ant.ListIndex = Me.cmb_comu_ant.ListIndex
End Sub

Private Sub cmb_comu_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_comu_ant.Text) <> 0 Then
    Me.txt_fon_ant.Enabled = True
    Me.txt_fon_ant.SetFocus
Else
    Me.cmb_comu_ant.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_comu2_ant_Click()
cmb_reg2_ant.Visible = True
cmb_reg2_ant.ListIndex = Me.cmb_comu2_ant.ListIndex
End Sub

Private Sub cmb_comu2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_comu2_ant.Text) <> 0 Then
    Me.txt_fo2_ant.Enabled = True
    Me.txt_fo2_ant.SetFocus
Else
    Me.cmb_comu2_ant.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_con_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_con_apo.Text) <> 0 Then
    Me.cmb_tip_apo.Enabled = True
    cmb_tip_apo.SetFocus
Else
    Me.cmb_con_apo.SetFocus
End If
KeyAscii = 0
End Sub


Private Sub cmb_cur_ins_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_cur_ins) <> 0 Then
   Me.Cmb_jor_alu.Enabled = True
   Me.Cmb_jor_alu.SetFocus
Else
    Me.cmb_cur_ins.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub Cmb_embarazo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.Cmb_embarazo) <> 0 Then
    If Anhopostulacion = Anno Then
        Me.cmb_repitente.Enabled = True
        Me.cmb_repitente.SetFocus
    Else
        Me.btn_sgte_5.Enabled = True
        btn_sgte_5.SetFocus
    End If
Else
    Me.Cmb_embarazo.SetFocus
End If

End Sub




Private Sub cmb_exi_alu_GotFocus()
Me.cmb_exi_alu.ListIndex = 1
End Sub

Private Sub cmb_exi_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_exi_alu.Text) <> 0 Then
    Me.txt_estado_alu.Enabled = True
    Me.txt_estado_alu.SetFocus
End If

KeyAscii = 0
End Sub

Private Sub cmb_exi_alu_LostFocus()
If cmb_exi_alu.Text = "No" Then
    cmb_com_ant.Enabled = False
    cmb_com_ant.Text = "No"
Else
    cmb_com_ant.Enabled = True
    cmb_com_ant.Text = "No"
End If
   
End Sub

Private Sub Cmb_indigena_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 And Len(Me.Cmb_indigena) <> 0 Then
    If Me.cmb_sex_alu = "F" Then
        Me.Cmb_embarazo.Enabled = True
        Me.Cmb_embarazo.SetFocus
    Else
        If Anhopostulacion = Anno Then
            Me.cmb_repitente.Enabled = True
            Me.cmb_repitente.SetFocus
        Else
            Me.btn_sgte_5.Enabled = True
            btn_sgte_5.SetFocus
        End If
    End If
Else
    Me.cmb_com_ant.SetFocus
End If

End Sub

Private Sub Cmb_jor_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.Cmb_jor_alu.Text) <> 0 Then
   Me.dtp_fec_alu.Enabled = True
   Me.dtp_fec_alu.SetFocus
Else
    Me.Cmb_jor_alu.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub Cmb_jor_alu_LostFocus()
CodModalidad = devuelvecampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.Cmb_mod_cur.Text & "'", conn)
    Ngrado = Me.cmb_cur_ins.Text
    Joralu = devuelvecampo("jornadas", "", "cod_jor", "des_jor = '" & Me.Cmb_jor_alu.Text & "'", conn)
    
    If ExistReg("vac_x_nivel", "cod_ens = '" & CodModalidad & "' and num_gra ='" & Ngrado & "' and cod_jor = '" & Joralu & "' and agno = " & Anhopostulacion2, conn) Then
        vacantes = devuelvecampo("vac_x_nivel", "", "dis_vac", "cod_ens = '" & CodModalidad & "' and num_gra ='" & Ngrado & "' and cod_jor = '" & Joralu & "' and agno = " & Anhopostulacion, conn)
        If vacantes < 0 Then
            MsgBox ("No hay vacantes para este curso")
            Me.SSTab1.Tab = 0
            Me.Cmb_mod_cur.SetFocus
        End If
    Else
        MsgBox ("No hay información sobre vacantes para" & Chr(13) & "este curso. Sírvase a ingresarlas.")
        Me.SSTab1.Tab = 0
        Me.Cmb_mod_cur.SetFocus
    End If
End Sub

Private Sub cmb_ni2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_ni2_ant.Text) <> 0 Then
    Me.txT_pr2_ant.Enabled = True
    Me.txT_pr2_ant.SetFocus
Else
    Me.cmb_ni2_ant.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_niv_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_niv_ant.Text) <> 0 Then
    Me.txt_pro_ant.Enabled = True
    Me.txt_pro_ant.SetFocus
Else
    Me.cmb_niv_ant.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_niv_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.cmb_niv_apo.Text)) <> 0 Then
    Me.cmb_par_apo.Enabled = True
    cmb_par_apo.SetFocus
Else
    Me.cmb_niv_apo.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_pad_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_pad_ant.Text) <> 0 Then
    Me.cmb_alu_ant.Enabled = True
    cmb_alu_ant.SetFocus
Else
    Me.cmb_pad_ant.SetFocus
End If
KeyAscii = 0
End Sub





Private Sub cmb_par_apo_Click()
If Me.cmb_par_apo.Text = "Madre" Then
    If Trim(Me.txt_apm_alu.Text) <> Trim(Me.TXT_APP_APO.Text) Then
        If MsgBox("No hay relación de apellidos entre Madre e Hijo" & Chr(13) & chr13 & Chr(13) & "Apellido Madre ->  " & Me.TXT_APP_APO.Text & Chr(13) & "Apellido Hijo     ->  " & Me.txt_apm_alu.Text & Chr(13) & Chr(13) & "Corrija el apellido que corresponda" & Chr(13) & "o verifique la opción de parentesco." & Chr(13) & Chr(13) & "¿Desea Corregir?", vbYesNo + vbQuestion) = vbYes Then
            SSTab1.Tab = 1
            Me.TXT_APP_APO.Enabled = True
            Me.TXT_APP_APO.SetFocus
            SendKeys "{home}+{end}"
            errorapellidos = 1
        Else
            errorapellidos = 0
        End If
    End If
    Me.txt_ru2_ant.Text = ""
    Me.txt_dig_pad.Text = ""
    Me.txt_nom2_ant.Text = ""
    Me.txt_di2_ant.Text = ""
    Call llenacombo(cmb_comu2_ant, "codigos__geograficos", "comuna", "", conn)
    Me.cmb_comu2_ant.Text = ""
    Me.cmb_reg2_ant.Text = ""
    Me.txt_fo2_ant.Text = ""
    Me.cmb_ni2_ant.Text = ""
    Me.cmb_ni2_ant.ListIndex = 5
    Me.txT_pr2_ant.Text = ""
    Me.txt_em2_ant.Text = ""
    Me.txt_emp_fo2_ant.Text = ""
    Me.txt_emp_cel2_ant.Text = ""
    Me.Image1.Visible = True
    Me.Image2.Visible = False
    
    Me.txt_rut_ant.Text = Me.txt_rut_apo.Text
    Me.txt_diG_MAD.Text = Me.txt_dig_apo.Text
    Me.txt_mad_Ant.Text = Me.txt_nom_Apo + " " + Me.TXT_APP_APO + " " + Me.txt_apm_apo
    Me.txt_dir_ant.Text = Me.txt_dir_apo.Text
    Me.cmb_comu_ant.Text = Me.cmb_com_apo.Text
    Me.cmb_reg_ant.Text = Me.cmb_reg_apo.Text
    Me.txt_fon_ant.Text = Me.txt_fon_apo.Text
    Me.cmb_niv_ant.Text = Me.cmb_niv_apo.Text
    Me.txt_pro_ant.Text = Me.txt_pro_apo.Text
    Me.txt_emp_ant.Text = Me.txt_emp_apo.Text
    Me.txt_emp_fon_ant.Text = Me.txt_fon_emp_apo.Text
    Me.txt_emp_cel_ant.Text = Me.txt_cel_apo.Text
    
    Me.txt_rut_ant.Enabled = False
    Me.txt_diG_MAD.Enabled = False
    Me.txt_mad_Ant.Enabled = False
    Me.txt_dir_ant.Enabled = False
    Me.cmb_comu_ant.Enabled = False
    Me.cmb_reg_ant.Enabled = False
    Me.txt_fon_ant.Enabled = False
    Me.cmb_niv_ant.Enabled = False
    Me.txt_pro_ant.Enabled = False
    Me.txt_emp_ant.Enabled = False
    Me.txt_emp_fon_ant.Enabled = False
    Me.txt_emp_cel_ant.Enabled = False
    
    Me.txt_ru2_ant.Enabled = True
    Me.txt_dig_pad.Enabled = False
    Me.txt_nom2_ant.Enabled = False
    Me.txt_di2_ant.Enabled = False
    Me.cmb_comu2_ant.Enabled = False
    Me.txt_fo2_ant.Enabled = False
    Me.cmb_ni2_ant.Enabled = False
    Me.txT_pr2_ant.Enabled = False
    Me.txt_em2_ant.Enabled = False
    Me.txt_emp_fo2_ant.Enabled = False
    Me.txt_emp_cel2_ant.Enabled = False
    'Me.txt_ru2_ant.SetFocus

ElseIf Me.cmb_par_apo.Text = "Padre" Then
    'aquí limpio la información encontrada en la opción "Madre"
    If Trim(Me.txt_app_alu.Text) <> Trim(Me.TXT_APP_APO.Text) Then
        If MsgBox("No hay relación de apellidos entre Padre e Hijo" & Chr(13) & chr13 & Chr(13) & "Apellido Padre ->  " & Me.TXT_APP_APO.Text & Chr(13) & "Apellido Hijo     ->  " & Me.txt_app_alu.Text & Chr(13) & Chr(13) & "Corrija el apellido que corresponda" & Chr(13) & "o verifique la opción de parentesco." & Chr(13) & Chr(13) & "¿Desea Corregir?", vbYesNo + vbQuestion) = vbYes Then
            SSTab1.TabVisible(1) = True
            SSTab1.Tab = 1
            Me.TXT_APP_APO.Enabled = True
            Me.TXT_APP_APO.SetFocus
            SendKeys "{home}+{end}"
            errorapellidos = 1
        Else
            errorapellidos = 0
        End If
    End If
    
    Me.txt_rut_ant.Enabled = True
    Me.txt_diG_MAD.Enabled = False
    Me.txt_mad_Ant.Enabled = False
    Me.txt_dir_ant.Enabled = False
    Me.cmb_comu_ant.Enabled = False
    Me.cmb_reg_ant.Enabled = False
    Me.txt_fon_ant.Enabled = False
    Me.cmb_niv_ant.Enabled = False
    Me.txt_pro_ant.Enabled = False
    Me.txt_emp_ant.Enabled = False
    Me.txt_emp_fon_ant.Enabled = False
    Me.txt_emp_cel_ant.Enabled = False
    
    Me.txt_rut_ant.Text = ""
    Me.txt_diG_MAD.Text = ""
    Me.txt_mad_Ant.Text = ""
    Me.txt_dir_ant.Text = ""
    Me.Image2.Visible = True
    Me.Image1.Visible = False
    Call llenacombo(cmb_comu_ant, "codigos__geograficos", "comuna", "", conn)
    Me.cmb_comu_ant.Text = ""
    Me.cmb_reg_ant.Text = ""
    Me.txt_fon_ant.Text = ""
    Me.cmb_niv_ant.Text = ""
    Me.cmb_niv_ant.ListIndex = 5
    Me.txt_pro_ant.Text = ""
    Me.txt_emp_ant.Text = ""
    Me.txt_emp_fon_ant.Text = ""
    Me.txt_ru2_ant.Text = Me.txt_rut_apo.Text
    Me.txt_dig_pad.Text = Me.txt_dig_apo.Text
    Me.txt_nom2_ant.Text = Me.txt_nom_Apo + " " + Me.TXT_APP_APO + " " + Me.txt_apm_apo
    Me.txt_di2_ant.Text = Me.txt_dir_apo.Text
    Me.cmb_comu2_ant.Text = Me.cmb_com_apo.Text
    Me.cmb_reg2_ant.Text = Me.cmb_reg_apo.Text
    Me.txt_fo2_ant.Text = Me.txt_fon_apo.Text
    Me.cmb_ni2_ant.Text = Me.cmb_niv_apo.Text
    Me.txT_pr2_ant.Text = Me.txt_pro_apo.Text
    Me.txt_em2_ant.Text = Me.txt_emp_apo.Text
    Me.txt_emp_fo2_ant.Text = Me.txt_fon_emp_apo.Text
    Me.txt_emp_cel2_ant.Text = Me.txt_cel_apo
    
    Me.txt_ru2_ant.Enabled = False
    Me.txt_dig_pad.Enabled = False
    Me.txt_nom2_ant.Enabled = False
    Me.txt_di2_ant.Enabled = False
    Me.cmb_comu2_ant.Enabled = False
    Me.cmb_comu2_ant.Enabled = False
    Me.txt_fo2_ant.Enabled = False
    Me.cmb_ni2_ant.Enabled = False
    Me.txT_pr2_ant.Enabled = False
    Me.txt_em2_ant.Enabled = False
    Me.txt_emp_fo2_ant.Enabled = False
    Me.txt_emp_cel2_ant.Enabled = False
    
  
    'Me.txt_rut_ant.SetFocus

Else
    'Me.txt_rut_ant.Text = ""
    'Me.txt_diG_MAD.Text = ""
    'Me.txt_mad_Ant.Text = ""
    'Me.txt_dir_ant.Text = ""
    Call llenacombo(cmb_comu_ant, "codigos__geograficos", "comuna", "", conn)
    'Me.cmb_comu_ant.Text = ""
    'Me.cmb_reg_ant.Text = ""
    'Me.txt_fon_ant.Text = ""
    'Me.cmb_niv_ant.Text = ""
   'Me.cmb_niv_ant.ListIndex = 5
    'Me.txt_pro_ant.Text = ""
    'Me.txt_emp_ant.Text = ""
    'Me.txt_emp_fon_ant.Text = ""
    'Me.txt_ru2_ant.Text = ""
    'Me.txt_dig_pad.Text = ""
    'Me.txt_nom2_ant.Text = ""
    'Me.txt_di2_ant.Text = ""
    Call llenacombo(cmb_comu2_ant, "codigos__geograficos", "comuna", "", conn)
    'Me.cmb_comu2_ant.Text = ""
    'Me.cmb_reg2_ant.Text = ""
    'Me.txt_fo2_ant.Text = ""
    'Me.cmb_ni2_ant.Text = ""
   'Me.cmb_ni2_ant.ListIndex = 5
    'Me.txT_pr2_ant.Text = ""
    'Me.txt_em2_ant.Text = ""
    'Me.txt_emp_fo2_ant.Text = ""
    

    Me.txt_rut_ant.Enabled = True
    Me.txt_diG_MAD.Enabled = False
    Me.txt_mad_Ant.Enabled = False
    Me.txt_dir_ant.Enabled = False
    Me.cmb_comu_ant.Enabled = False
    Me.cmb_reg_ant.Enabled = False
    Me.txt_fon_ant.Enabled = False
    Me.cmb_niv_ant.Enabled = False
    Me.txt_pro_ant.Enabled = False
    Me.txt_emp_ant.Enabled = False
    Me.txt_emp_fon_ant.Enabled = False

    Me.txt_ru2_ant.Enabled = False
    Me.txt_dig_pad.Enabled = False
    Me.txt_nom2_ant.Enabled = False
    Me.txt_di2_ant.Enabled = False
    Me.cmb_comu2_ant.Enabled = False
    Me.cmb_comu2_ant.Enabled = False
    Me.txt_fo2_ant.Enabled = False
    Me.cmb_ni2_ant.Enabled = False
    Me.txT_pr2_ant.Enabled = False
    Me.txt_em2_ant.Enabled = False
    Me.txt_emp_fo2_ant.Enabled = False
    'Me.txt_rut_ant.SetFocus
End If
End Sub

Private Sub cmb_par_apo_KeyPress(KeyAscii As Integer)
If Len(Trim(Me.cmb_par_apo.Text)) <> 0 And KeyAscii = 13 Then
    Me.txt_pro_apo.Enabled = True
    Me.txt_pro_apo.SetFocus
Else
    Me.cmb_par_apo.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_pro_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_pro_ant.Text) <> 0 Then
    Me.txt_ing_ant.Enabled = True
    txt_ing_ant.SetFocus
Else
    Me.cmb_pro_ant.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub cmb_reg_alu_Click()
rs.CursorLocation = adUseClient
rs.Open "SELECT COMUNA FROM CODIGOS__GEOGRAFICOS WHERE REGION = " & "'" & cmb_reg_alu & "' ORDER BY COMUNA", conn
If rs.RecordCount > 0 Then
Me.cmb_com_alu.Enabled = True
Me.cmb_com_alu.Clear
While Not rs.EOF
    cmb_com_alu.AddItem rs("COMUNA")
    rs.MoveNext
Wend
Me.cmb_com_alu.ListIndex = 0
End If
rs.Close
End Sub

Private Sub cmb_reg_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmb_com_alu.Enabled = True
cmb_com_alu.SetFocus
End If
End Sub

'Private Sub cmb_reg_apo_Click()
'rs.CursorLocation = adUseClient
'rs.Open "SELECT COMUNA FROM CODIGOS__GEOGRAFICOS WHERE REGION = " & "'" & cmb_reg_apo & "' ORDER BY COMUNA", conn
'If rs.recordcount > 0 Then
'Me.cmb_com_apo.Enabled = True
'Me.cmb_com_apo.Clear
'While Not rs.EOF
'    cmb_com_apo.AddItem rs("COMUNA")
'    rs.MoveNext
'Wend
'Me.cmb_com_apo.ListIndex = 0
'End If
'rs.Close
'End Sub
Private Sub cmb_reg_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmb_com_apo.Enabled = True
cmb_com_apo.SetFocus
End If
End Sub

Private Sub cmb_repitente_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_repitente) <> 0 Then
        Me.btn_sgte_5.Enabled = True
        btn_sgte_5.SetFocus
Else
    Me.cmb_repitente.SetFocus
End If
End Sub

Private Sub cmb_sex_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_sex_alu.Text) <> 0 Then
    Me.Cmd_nac_alu.Enabled = True
    Me.Cmd_nac_alu.SetFocus
End If

End Sub

Private Sub cmb_sol_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_sol_ant.Text) <> 0 Then
    Me.cmb_com_ant.Enabled = True
    cmb_com_ant.SetFocus
Else
    Me.cmb_sol_ant.SetFocus
End If

End Sub

Private Sub cmb_tip_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.cmb_tip_apo.Text) <> 0 Then
    Me.btn_sgte_1.Enabled = True
    Me.btn_sgte_1.SetFocus
Else
    Me.cmb_tip_apo.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub Command1_Click()
If Anhopostulacion > 2005 Then
    Me.frmFecEval.Visible = True
    SSTab1.Enabled = False
    Dim llenarfecha As ADODB.Recordset
    Dim xind As Integer
    
    
    Set llenarfecha = New ADODB.Recordset
    
    llenarfecha.Open "select date_format(eval_fechora,'%d-%m-%Y') as fechac, date_format(eval_fechora,'%H:%i') as hora from fechasevaluacion where agno_postulacion=" & str(agno_label), conn
    
    If llenarfecha.RecordCount < 1 Then
        MsgBox "No Existen Fechas de Evaluación Asignadas", , "Sin Evaluaciones"
        pasoonoal = False
        Load Form_Ficha_DefEval
        llenarfecha.Close
        Exit Sub
    End If
    pasoonoal = True
    xind = 1
    With Me.msfeceval
    .Rows = llenarfecha.RecordCount + 1
    .Row = 0
    .ColWidth(1) = 1500
    .Col = 1
    .CellFontBold = True
    .Text = "Fecha"
    
    .ColWidth(2) = 1200
    .Col = 2
    .CellFontBold = True
    .Text = "Hora"
    
    .ColWidth(0) = 0
    
    While Not llenarfecha.EOF
        .Row = xind
        .Col = 1
        .Text = llenarfecha!fechac
        .Col = 2
        .Text = llenarfecha!hora
        llenarfecha.MoveNext
        xind = xind + 1
    Wend
        
    llenarfecha.Close
    End With
End If
End Sub

Private Sub dtp_fec_alu_KeyDown(KeyCode As Integer, Shift As Integer)
Dim Fecha As Date

If KeyCode = 13 And Len(Me.dtp_fec_alu.Value) <> 0 Then
    Me.cmb_sex_alu.Enabled = True
    Me.cmb_sex_alu.SetFocus
    'ANHO = anno
    Anhopostulacion = agno_label
    Fecha = CDate("30-06-" & Anhopostulacion)
    Me.txt_eda_alu.Text = calculaEdad(dtp_fec_alu.Value, Fecha)
    Codens = devuelvecampo("codigos_ensenanza", "", "cod_ens", "des_ens ='" & Me.Cmb_mod_cur.Text & "'", conn)
    If Me.cmb_cur_ins.Text = "1" And Codens = "110" Then
    'Implementar más adelante códigos propios en tipos enseñanza para diferenciar 1 medio, de 1 basica
        If calculaEdad(Me.dtp_fec_alu.Value, Fecha) < 6 Then
            MsgBox ("Alumno no tiene la edad suficiente para postular a este nivel, " & Chr(13) & "verifique fecha de nacimiento o nivel al cual postula.")
            Me.dtp_fec_alu.SetFocus
        End If
    ElseIf Me.cmb_cur_ins.Text = "1" And Codens = "010" Then
        If calculaEdad(Me.dtp_fec_alu.Value, Fecha) < 5 Then
            MsgBox ("Alumno no tiene la edad suficiente para postular a este nivel, " & Chr(13) & "verifique fecha de nacimiento o nivel al cual postula.")
            Me.dtp_fec_alu.SetFocus
        End If
    ElseIf Me.cmb_cur_ins.Text = "1" And Codens = "996" Then
        If calculaEdad(Me.dtp_fec_alu.Value, Fecha) < 4 Then
            MsgBox ("Alumno no tiene la edad suficiente para postular a este nivel, " & Chr(13) & "verifique fecha de nacimiento o nivel al cual postula.")
            Me.dtp_fec_alu.SetFocus
        End If
    End If
End If
End Sub


Private Sub DTP_FEC_EVA_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Len(Me.DTP_FEC_EVA.Value) <> 0 Then
    If Me.DTP_FEC_EVA.Value >= Me.DTP_FEC_INS Then
        Me.DTP_HOR_EVA.Enabled = True
        DTP_HOR_EVA.SetFocus
    Else
        MsgBox ("Fecha de evaluación, no puede ser menor " & Chr(13) & "a fecha de inscripción")
        Me.DTP_FEC_EVA.SetFocus
    End If
Else
    Me.DTP_FEC_EVA.SetFocus
End If
End Sub



Private Sub Dtp_fec_her_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Len(Me.Dtp_fec_her.Value) <> 0 Then
    BTN_ACE_ANT.Enabled = True
    BTN_ACE_ANT.SetFocus
    Me.txt_ed1_ant.Text = calculaEdad(Dtp_fec_her.Value, Date)
End If
End Sub

Private Sub DTP_FEC_INS_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Len(Me.DTP_FEC_INS.Value) <> 0 Then
    Me.DTP_FEC_EVA.Enabled = True
    Me.DTP_FEC_EVA.SetFocus
    Me.DTP_FEC_EVA.Value = Me.DTP_FEC_INS.Value
Else
    Me.DTP_FEC_INS.SetFocus
End If
End Sub


Private Sub DTP_FEC_INS_LostFocus()
'Me.DTP_FEC_EVA.Value = Me.DTP_FEC_INS.Value
End Sub

Private Sub DTP_HOR_EVA_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Len(Me.DTP_HOR_EVA.Value) <> 0 Then
    Me.btn_ace_opc.Enabled = True
    Me.btn_ace_opc.SetFocus
Else
    Me.DTP_HOR_EVA.SetFocus
End If

End Sub


Private Sub DTP_HOR_EVA_LostFocus()
   'MsgBox str(Anhopostulacion)
    'MsgBox Format(Me.DTP_FEC_EVA.Value, "YYYY-mm-dd") & " " & Format(Me.DTP_HOR_EVA, "HH:mm:ss")
    Dim buscarfecha As ADODB.Recordset
    
    If Anhopostulacion > 2005 Then
        Set buscarfecha = New ADODB.Recordset
        buscarfecha.Open "Select date_format(eval_fechora,'%d-%m-%Y') as fechor from fechasevaluacion where date_format(eval_fechora,'%Y-%m-%d %H:%i')='" & Format(Me.DTP_FEC_EVA.Value, "YYYY-mm-dd") & " " & Format(Me.DTP_HOR_EVA, "HH:mm") & "'", conn
        If buscarfecha.RecordCount < 1 Then
            MsgBox "Ingreso una fecha no valida de evalución"
            buscarfecha.Close
            Command1_Click
        End If
    End If
    
End Sub

Private Sub Form_Activate()

CentrarForma Me
'Me.lbl_mem.Caption = "FICHA DE POSTULACIÓN E INSCRIPCIÓN " + str(agno_label)
cmb_pad_ant = "Casados"
cmb_alu_ant = "Los Padres"
cmb_cas_ant = "Casa"
cmb_pro_ant = "Propia"
cmb_sol_ant = "Si"
cmb_com_ant = "Si"
Cmd_nac_alu.ListIndex = 1
Me.Cmb_embarazo.ListIndex = 1
Me.Cmb_indigena.ListIndex = 1
Me.cmb_repitente.ListIndex = 1
If Month(Date) < 4 Then
  agno_label = Year(Date)
  If Not Primera Then
     agno_label_ant = Year(Date)
     Anhopostulacion2 = Trim(str(agno_label_ant))
  End If
Else
  agno_label = Year(Date) + 1
  If Not Primera Then
     agno_label_ant = Year(Date)
     Anhopostulacion2 = Trim(str(agno_label_ant))
  End If
  
  Me.lbl_mem.Caption = "FICHA DE POSTULACIÓN E INSCRIPCIÓN " + str(agno_label)
End If
Me.BTN_CAMBIA_ANHO.Enabled = True
pasopor = False
End Sub

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

Private Sub Form_Load()
Call menuhabilitado(False)
Dim userpc, pcname As String
hayapo = False
Busqueda = 1
Busqueapo = 1
Rut_Apo_Ok = False
errorapellidos = 1
Me.Cmb_mod_cur = ""
Me.cmb_cur_ins = ""
Me.Cmb_jor_alu = ""
Me.cmb_sex_alu = ""
Me.cmb_exi_alu = ""
Me.cmb_niv_apo = ""
Me.cmb_par_apo = ""
Me.cmb_con_apo = ""
Me.cmb_tip_apo = ""
Me.cmb_niv_ant = ""
Me.cmb_ni2_ant = ""
Me.txt_app_alu.Enabled = True
Me.txt_apm_alu.Enabled = False
Me.txt_nom_alu.Enabled = False
Me.txt_rut_alu.Enabled = False
Me.txT_dig_alu.Enabled = False
Me.Cmb_mod_cur.Enabled = False
Me.cmb_cur_ins.Enabled = False
Me.Cmb_jor_alu.Enabled = False
Me.dtp_fec_alu.Enabled = False
Me.txt_eda_alu.Enabled = False
Me.cmb_sex_alu.Enabled = False
Me.txt_dir_alu.Enabled = False
Me.Cmd_nac_alu.Enabled = False
Me.cmb_com_alu.Enabled = False
Me.txt_fon_alu.Enabled = False
Me.txt_col_alu.Enabled = False
Me.txt_pro_alu.Enabled = False
Me.txt_enf_alu.Enabled = False
Me.txt_tra_alu.Enabled = False
Me.txt_ale_alu.Enabled = False
Me.txt_eme_alu.Enabled = False
Me.txt_fon_eme_alu.Enabled = False
Me.cmb_exi_alu.Enabled = False
Me.txt_estado_alu.Enabled = False
Me.Btn_Eli_0.Enabled = False
Me.Btn_sgte_0.Enabled = False
Me.txt_nom_Apo.Enabled = False
Me.TXT_APP_APO.Enabled = False
Me.txt_apm_apo.Enabled = False
Me.txt_dir_apo.Enabled = False
Me.cmb_com_apo.Enabled = False
Me.txt_fon_apo.Enabled = False
Me.txt_cel_apo.Enabled = False
Me.cmb_niv_apo.Enabled = False
Me.cmb_par_apo.Enabled = False
Me.txt_pro_apo.Enabled = False
Me.txt_emp_apo.Enabled = False
Me.txt_fon_emp_apo.Enabled = False
Me.cmb_con_apo.Enabled = False
Me.cmb_tip_apo.Enabled = False
Me.Btn_Anterior_1.Enabled = False
Me.btn_sgte_1.Enabled = False
Me.txt_mad_Ant.Enabled = False
Me.txt_rut_ant.Enabled = False
Me.txt_dir_ant.Enabled = False
Me.cmb_comu_ant.Enabled = False
Me.txt_fon_ant.Enabled = False
Me.cmb_niv_ant.Enabled = False
Me.txt_emp_ant.Enabled = False
Me.txt_emp_fon_ant.Enabled = False
Me.txt_nom2_ant.Enabled = False
Me.txt_ru2_ant.Enabled = False
Me.txt_di2_ant.Enabled = False
Me.cmb_comu2_ant.Enabled = False
Me.txt_fo2_ant.Enabled = False
Me.cmb_ni2_ant.Enabled = False
Me.txT_pr2_ant.Enabled = False
Me.txt_em2_ant.Enabled = False
Me.txt_emp_fo2_ant.Enabled = False
Me.btn_sgte_2.Enabled = False
Me.btn_anterior_2.Enabled = False
Me.cmb_pad_ant.Enabled = False
Me.cmb_alu_ant.Enabled = False
Me.cmb_cas_ant.Enabled = False
Me.cmb_pro_ant.Enabled = False
Me.txt_ing_ant.Enabled = False
Me.txt_no1_ant.Enabled = False
Me.TXT_AP1_ANT.Enabled = False
Me.TXT_AM1_ANT.Enabled = False
Me.txt_ed1_ant.Enabled = False
'Me.Grd_Her_Ant.Enabled = False
Me.Dtp_fec_her.Enabled = False
Me.BTN_ACE_ANT.Enabled = True
Me.BTN_ELI_ANT.Enabled = False
Me.btn_anterior_3.Enabled = False
Me.btn_sgte_3.Enabled = False
Me.frame_anho.Visible = False
Me.frame_sombra.Visible = False
Me.BTN_CAMBIA_ANHO.Visible = True
Me.btn_ace_opc.Enabled = True
Form_ficha.KeyPreview = True
Form_ficha.lst_app_alu.Visible = False
CentrarForma Me
Form_ficha.Show

'
Set RsAux = New ADODB.Recordset
SSTab1.TabVisible(1) = False
SSTab1.TabVisible(2) = False
SSTab1.TabVisible(3) = False
SSTab1.TabVisible(4) = False
SSTab1.TabVisible(5) = False
SSTab1.TabVisible(6) = False
Set rs = New ADODB.Recordset
Call llenacombo(cmb_tip_apo, "tipo_apo", "des_tipo_apo", "", conn)
Call llenacombo(cmb_con_apo, "CONVENIOS", "DES_CONV", "", conn)
Call llenacombo(Cmb_mod_cur, "codigos_ensenanza", "des_ens", "order by ord_ens", conn)
Call llenacombo(Form_ficha.Cmb_jor_alu, "jornadas", "des_jor", "", conn)
rs.CursorLocation = adUseClient
rs.Open "SELECT distinct Comuna, Provincia FROM codigos__geograficos ORDER BY COMUNA ASC", conn
If rs.RecordCount > 0 Then
    Me.cmb_reg_alu.Clear
    Me.cmb_com_alu.Clear
    
    Me.cmb_reg_apo.Clear
    Me.cmb_com_apo.Clear
    
    Me.cmb_reg_ant.Clear
    Me.cmb_comu_ant.Clear
    
    Me.cmb_reg2_ant.Clear
    Me.cmb_comu2_ant.Clear
    
    For t = 0 To rs.RecordCount - 1
        Me.cmb_com_alu.AddItem rs("Comuna")
        Me.cmb_reg_alu.AddItem rs("Provincia")
        
        Me.cmb_com_apo.AddItem rs("Comuna")
        Me.cmb_reg_apo.AddItem rs("Provincia")
        
        Me.cmb_comu_ant.AddItem rs("Comuna")
        Me.cmb_reg_ant.AddItem rs("Provincia")
        
        Me.cmb_comu2_ant.AddItem rs("Comuna")
        Me.cmb_reg2_ant.AddItem rs("Provincia")
        
        rs.MoveNext
    Next t
End If
rs.Close
Me.txt_enc_alu.Text = Nom_com_usu_ses
Me.txt_app_alu.SetFocus
Busqueapo = 1
 
 Environ$ ("COMPUTERNAME")
End Sub
Private Sub cmb_mod_cur_Click()
If Len(Me.Cmb_mod_cur.Text) <> 0 Then
Nivel = devuelvecampo("codigos_ensenanza", "des_ens", "Num_gra_max", "des_ens = '" & Me.Cmb_mod_cur.Text & "'", conn)
Me.cmb_cur_ins.Clear
For t = 1 To Val(Nivel)
    Me.cmb_cur_ins.AddItem t
Next t
Else
    Me.cmb_cur_ins.Enabled = True
    Me.cmb_cur_ins.SetFocus
End If

End Sub

Private Sub Cmb_mod_cur_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Me.Cmb_mod_cur.Text) <> 0 Then
    Me.cmb_cur_ins.Enabled = True
    Me.cmb_cur_ins.SetFocus
Else
    Me.Cmb_mod_cur.SetFocus
End If
KeyAscii = 0
End Sub

Private Sub Cmb_mod_cur_LostFocus()
If Me.Cmb_mod_cur.Text = "Verdadero" Then
    Me.Cmb_mod_cur.Text = ""
    Me.Cmb_mod_cur.SetFocus
End If

End Sub

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



Private Sub Grd_Her_Ant_Click()
'If Me.Grd_Her_Ant.Row >= 1 And Me.Grd_Her_Ant.Text <> "" Then
'    Me.BTN_ELI_ANT.Enabled = True
'End If
End Sub



Private Sub Image1_Click()
    txt_rut_ant.Text = txt_rut_apo.Text
    txt_diG_MAD.Text = txt_dig_apo.Text
    txt_mad_Ant.Text = txt_nom_Apo.Text & " " & TXT_APP_APO.Text & " " & txt_apm_apo.Text
    txt_dir_ant.Text = txt_dir_apo.Text
    cmb_comu_ant.Text = cmb_com_apo.Text
    txt_fon_ant.Text = txt_fon_apo
    cmb_niv_ant.Text = cmb_niv_apo.Text
    txt_pro_ant.Text = txt_pro_apo.Text
    txt_emp_ant.Text = txt_emp_apo.Text
    txt_emp_fon_ant.Text = txt_fon_emp_apo.Text
    txt_emp_cel_ant.Text = txt_cel_apo.Text
End Sub

Private Sub Image2_Click()
    txt_ru2_ant.Text = txt_rut_apo.Text
    txt_dig_pad.Text = txt_dig_apo.Text
    txt_nom2_ant.Text = txt_nom_Apo.Text & " " & TXT_APP_APO.Text & " " & txt_apm_apo.Text
    txt_di2_ant.Text = txt_dir_apo.Text
    cmb_comu2_ant.Text = cmb_com_apo.Text
    txt_fo2_ant.Text = txt_fon_apo
    cmb_ni2_ant.Text = cmb_niv_apo.Text
    txT_pr2_ant.Text = txt_pro_apo.Text
    txt_em2_ant.Text = txt_emp_apo.Text
    txt_emp_fo2_ant.Text = txt_fon_emp_apo.Text
    txt_emp_cel2_ant.Text = txt_cel_apo.Text
End Sub

Private Sub lst_app_alu_DblClick()
Dim rutalumno As String
Dim CodModalidad, NumGra As String
Dim AnhoDatos As String

Indi = 0
Busqueda = 0
Busqueapo = 0
Me.lst_app_alu.Visible = False
rutalumno = aalumnos(lst_app_alu.ListIndex)
AnhoDatos = RetornaCampo("apo_x_alu", "agno", "ci_alu='" & rutalumno & "' ORDER BY agno DESC", conn)
If Val(AnhoDatos) <> 0 Then
    If Anno = Anhopostulacion2 Then
        AnhoDatos = Anhopostulacion2
    End If
End If
a = "SELECT p.cod_geo, p.cod_ens, p.num_gra, p.ape_pat_alu, p.ape_mat_alu, p.nom_alu, " & _
    "p.fec_nacalu, p.sex_alu, p.ind_ext_alu, p.dire_alu, p.fon_alu, p.col_procedencia_alu, " & _
    "p.enfermedades_alu, p.tratamiento_alu, p.alergico_a_alu, p.exime_rel_alu, p.fon_emergencia_alu, " & _
    "p.contacto_emergencia_alu, p.nom_pad_alu, p.dir_pad_alu, p.comuna_pad_alu, p.fon_pad_alu, p.rut_pad_alu, " & _
    "p.nivel_educ_pad_alu, p.profesion_pad_alu, p.empresa_pad_alu, p.empresa_fon_pad_alu, p.nom_mad_alu, " & _
    "p.dir_mad_alu, p.comuna_mad_alu, p.fon_mad_alu, p.rut_mad_alu, p.cel_mad_alu,p.cel_pad_alu, p.nivel_educ_mad_alu, p.profesion_mad_alu, " & _
    "p.empresa_mad_alu, p.empresa_fon_mad_alu, p.est_pad, p.alu_viv_con, p.grupo_viv_en, p.ing_fam, p.v_cer_nac, " & _
    "p.v_inf_not_par, p.v_cer_est_ult_cur, p.v_fotos, p.vi_sol_car_esc, p.vi_for_exi_rel, p.vii_fec_ins,p.ind_hermano, " & _
    "p.vii_nom_encargado, p.sit_cas, p.cod_jor, p.matriculado_alu, a.rut_apo, a.cod_tipo_apo, a.cod_conv, a.noms_apo, a.ape1_apo," & _
    "a.dir_apo, a.comuna_apo, a.fon_c_apo, a.cel_apo, a.nivel_educ_apo, a.profesio_apo, a.empresa, " & _
    "a.empresa_fon, a.ape2_apo, p.ind_embarazo, p.indigena FROM postulantes p, apo_x_alu apoa, apoderados a where p.ci_alu = apoa.ci_alu and apoa.rut_apo = a.rut_apo and p.ci_alu = " & "'" & rutalumno & "' and apoa.agno = " & AnhoDatos
    RsAux.CursorLocation = adUseClient
    RsAux.Open a, conn
    Me.txt_app_alu.Enabled = True
    Me.txt_apm_alu.Enabled = True
    Me.txt_nom_alu.Enabled = True
    Me.txt_rut_alu.Enabled = True
    Me.txT_dig_alu.Enabled = True
    Me.Cmb_mod_cur.Enabled = True
    Me.cmb_cur_ins.Enabled = True
    Me.Cmb_jor_alu.Enabled = True
    Me.dtp_fec_alu.Enabled = True
    Me.txt_eda_alu.Enabled = True
    Me.cmb_sex_alu.Enabled = True
    Me.txt_dir_alu.Enabled = True
    Me.Cmd_nac_alu.Enabled = True
    Me.cmb_com_alu.Enabled = True
    Me.txt_fon_alu.Enabled = True
    Me.txt_col_alu.Enabled = True
    Me.txt_pro_alu.Enabled = True
    Me.txt_enf_alu.Enabled = True
    Me.txt_tra_alu.Enabled = True
    Me.txt_ale_alu.Enabled = True
    Me.txt_eme_alu.Enabled = True
    Me.txt_fon_eme_alu.Enabled = True
    Me.cmb_exi_alu.Enabled = True
    'Me.txt_estado_alu.Enabled = True
    Me.Btn_Eli_0.Enabled = True
    Me.Btn_sgte_0.Enabled = True

    Me.txt_nom_Apo.Enabled = True
    Me.TXT_APP_APO.Enabled = True
    Me.txt_apm_apo.Enabled = True
    Me.txt_dir_apo.Enabled = True
    Me.cmb_com_apo.Enabled = True
    Me.txt_fon_apo.Enabled = True
    Me.txt_cel_apo.Enabled = True
    Me.cmb_niv_apo.Enabled = True
    Me.cmb_par_apo.Enabled = True
    Me.txt_pro_apo.Enabled = True
    Me.txt_emp_apo.Enabled = True
    Me.txt_fon_emp_apo.Enabled = True
    Me.cmb_con_apo.Enabled = True
    Me.cmb_tip_apo.Enabled = True
    Me.Btn_Anterior_1.Enabled = True
    Me.btn_sgte_1.Enabled = True
    Me.txt_mad_Ant.Enabled = True
    Me.txt_rut_ant.Enabled = True
    Me.txt_dir_ant.Enabled = True
    Me.cmb_comu_ant.Enabled = True
    Me.txt_fon_ant.Enabled = True
    Me.cmb_niv_ant.Enabled = True
    Me.txt_emp_ant.Enabled = True
    Me.txt_emp_fon_ant.Enabled = True
    Me.txt_nom2_ant.Enabled = True
    Me.txt_ru2_ant.Enabled = True
    Me.txt_di2_ant.Enabled = True
    Me.cmb_comu2_ant.Enabled = True
    Me.txt_fo2_ant.Enabled = True
    Me.cmb_ni2_ant.Enabled = True
    Me.txT_pr2_ant.Enabled = True
    Me.txt_em2_ant.Enabled = True
    Me.txt_emp_fo2_ant.Enabled = True
    Me.btn_sgte_2.Enabled = True
    Me.btn_anterior_2.Enabled = True
    Me.cmb_pad_ant.Enabled = True
    Me.cmb_alu_ant.Enabled = True
    Me.cmb_cas_ant.Enabled = True
    Me.cmb_pro_ant.Enabled = True
    Me.txt_ing_ant.Enabled = True
    Me.txt_no1_ant.Enabled = True
    Me.TXT_AP1_ANT.Enabled = True
    Me.TXT_AM1_ANT.Enabled = True
    Me.txt_ed1_ant.Enabled = True
    Me.Grd_Her_Ant.Enabled = True
    Me.Dtp_fec_her.Enabled = True
    Me.BTN_ACE_ANT.Enabled = True
    Me.BTN_ELI_ANT.Enabled = True
    Me.btn_anterior_3.Enabled = True
    Me.btn_sgte_3.Enabled = True


If RsAux.RecordCount > 0 Then
   ' Me.lbl_info.Caption = "El Alumno esta inscrito para el Año" & rsaux("anno_pos_alu")
   
    Me.BTN_CAMBIA_ANHO.Enabled = False
    Me.txt_app_alu.Text = RsAux("ape_pat_alu")
    Me.txt_nom_alu.Text = RsAux("nom_alu")
    Me.txt_rut_alu.Text = separarut(rutalumno)
    Me.txT_dig_alu.Text = separadigito(rutalumno)
    CodModalidad = RsAux("cod_ens")
    NumGra = RsAux("num_gra")
    If Not IsNull(RsAux("cod_ens")) Then
        Me.Cmb_mod_cur.Text = devuelvecampo("codigos_ensenanza", "", "Des_ens", "cod_ens = '" & RsAux("cod_ens") & "'", conn)
    End If
    If Not IsNull(RsAux("num_gra")) Then
        Me.cmb_cur_ins.Text = RsAux("num_gra")
    End If
    Me.Cmb_jor_alu.Text = devuelvecampo("jornadas", "", "des_jor", "cod_jor = '" & RsAux("cod_jor") & "'", conn)
    'Select Case UCase(rsaux("jornada_alu"))
    'Case "MAÑANA"
    '    Me.Cmb_jor_alu.ListIndex = 0
    'Case "TARDE"
    '    Me.Cmb_jor_alu.ListIndex = 1
    'End Select
    
    If RsAux("ind_ext_alu") = "1" Then Me.Cmd_nac_alu.Text = "SI"
    If RsAux("ind_ext_alu") = "2" Then Me.Cmd_nac_alu.Text = "NO"
     
    
    
    'rsaux ("matriculado_alu")
    
    If (CodPerfil <> "#ADM#" And CodPerfil <> "#SBD#" And CodPerfil <> "#GES03#") Then
        Me.btn_ace_opc.Enabled = False
    Else
        Me.btn_ace_opc.Enabled = True
    End If
   
    
    Me.txt_dir_alu.Text = RsAux("dire_alu")
    Me.cmb_com_alu.Text = devuelvecampo("codigos__geograficos", "", "comuna", "cod_geo = '" & RsAux("cod_geo") & "'", conn)
    Me.cmb_reg_alu.Text = devuelvecampo("codigos__geograficos", "", "provincia", "cod_geo = '" & RsAux("cod_geo") & "'", conn)
    
    Me.dtp_fec_alu.Value = RsAux("fec_nacalu")
'    Me.txt_eda_alu.Text = calculaEdad(dtp_fec_alu.Value, Format("03/30/" & Anhopostulacion, "dd/mm/yyyy")) ' PARAMETRIZAR
    Me.txt_enf_alu.Text = RsAux("enfermedades_alu")
    Me.txt_tra_alu.Text = RsAux("tratamiento_alu")
    If Not IsNull(RsAux("exime_rel_alu")) Then
        If RsAux("exime_rel_alu") Then
            Me.cmb_exi_alu.ListIndex = 0
        Else
            Me.cmb_exi_alu.ListIndex = 1
        End If
    End If
    
    Me.txt_eme_alu.Text = RsAux("contacto_emergencia_alu")
    Me.txt_apm_alu.Text = RsAux("ape_mat_alu")
    If RsAux("sex_alu") = "1" Or RsAux("sex_alu") = "2" Then
        Me.cmb_sex_alu.ListIndex = Val(RsAux("sex_alu")) - 1
    Else
    
        If Not IsNull(RsAux("sex_alu")) Then
            If UCase(RsAux("sex_alu")) = "M" Then
                Me.cmb_sex_alu.ListIndex = 0
            ElseIf UCase(RsAux("sex_alu")) = "F" Then
                Me.cmb_sex_alu.ListIndex = 1
            End If
        End If
    End If
    
    
    Me.txt_fon_alu.Text = RsAux("fon_alu")
    Me.txt_pro_alu.Text = RsAux("col_procedencia_alu")
    Me.txt_ale_alu.Text = RsAux("alergico_a_alu")
    'Me.cmd_nac_alu.Text = rsaux("ind_ext_alu")
    Me.txt_fon_eme_alu.Text = RsAux("fon_emergencia_alu")
    
    
    'AQUI VAN LOS DATOS DEL APODERADO //2
   If RsAux("rut_apo") <> "" Then
        Rut_Apo_Ok = True
        Rut_Ini_Apo = RsAux("rut_apo")
        Me.txt_rut_apo.Enabled = False: Me.txt_dig_apo.Enabled = False
        Me.txt_rut_apo.Text = separarut(RsAux("rut_apo"))
        Me.txt_dig_apo.Text = separadigito(RsAux("rut_apo"))
        rutapoderado = Me.txt_rut_apo.Text + "-" + Me.txt_dig_apo
    End If
    Me.txt_nom_Apo.Text = RsAux("noms_apo")
    Me.TXT_APP_APO.Text = RsAux("ape1_apo")
    Me.txt_apm_apo.Text = RsAux("ape2_apo")
    Me.txt_dir_apo.Text = RsAux("dir_apo")
    Me.cmb_com_apo.Text = devuelvecampo("codigos__geograficos", "", "comuna", "cod_geo = '" & RsAux("comuna_apo") & "'", conn)
    Me.cmb_reg_apo.Text = devuelvecampo("codigos__geograficos", "", "provincia", "cod_geo = '" & RsAux("comuna_apo") & "'", conn)
    
    Me.txt_fon_apo.Text = RsAux("fon_c_apo")
    Me.txt_cel_apo.Text = RsAux("cel_apo")
    
    Me.cmb_niv_apo = RsAux("nivel_educ_apo")
    'Select Case rsaux("nivel_educ_apo")
    '   Case "Enseñanza Basica Completa"
    '        Me.cmb_niv_apo.ListIndex = 0
    '    Case "Enseñanza Basica Incompleta"
    '        Me.cmb_niv_apo.ListIndex = 1
    '    Case "Enseñanza Media  Completa"
    '        Me.cmb_niv_apo.ListIndex = 2
    '    Case "Enseñanza Media Incompleta"
    '        Me.cmb_niv_apo.ListIndex = 3
    '    Case "Estudios Superiores"
    '        Me.cmb_niv_apo.ListIndex = 4
    'End Select
    'DEVOLVER PARENTESCO
    
    Me.cmb_par_apo = devuelvecampo("apo_x_alu", "", "parent_apo", "ci_alu ='" & rutalumno & "' and rut_apo ='" & rutapoderado & "'", conn)
    hayapo = True
     
    If Me.cmb_par_apo = "Madre" Then
        Me.txt_rut_ant.Enabled = False
        Me.txt_diG_MAD.Enabled = False
        Me.txt_mad_Ant.Enabled = False
        Me.txt_dir_ant.Enabled = False
        Me.cmb_comu_ant.Enabled = False
        Me.txt_fon_ant.Enabled = False
        Me.cmb_niv_ant.Enabled = False
        Me.txt_pro_ant.Enabled = False
        Me.txt_emp_ant.Enabled = False
        Me.txt_emp_fon_ant.Enabled = False
        Me.txt_emp_cel_ant.Enabled = False
        Me.Image2.Visible = False
    
    ElseIf Me.cmb_par_apo.Text = "Padre" Then
        Me.txt_ru2_ant.Enabled = True
        Me.txt_dig_pad.Enabled = False
        Me.txt_nom2_ant.Enabled = False
        Me.txt_di2_ant.Enabled = False
        Me.cmb_comu2_ant.Enabled = False
        Me.txt_fo2_ant.Enabled = False
        Me.cmb_ni2_ant.Enabled = False
        Me.txT_pr2_ant.Enabled = False
        Me.txt_em2_ant.Enabled = False
        Me.txt_emp_fo2_ant.Enabled = False
        Me.txt_emp_cel2_ant.Enabled = False
        Me.Image1.Visible = False

    End If
    
    
    
    
    Me.txt_emp_apo.Text = RsAux("empresa")
    Me.txt_pro_apo.Text = RsAux("profesio_apo")
    Me.txt_fon_emp_apo.Text = RsAux("empresa_fon")
    Me.cmb_con_apo.Text = devuelvecampo("convenios", "", "des_conv", "cod_conv = '" & RsAux("cod_conv") & "'", conn)
    Me.cmb_tip_apo.Text = devuelvecampo("tipo_apo", "", "des_tipo_apo", "cod_tipo_apo = '" & RsAux("cod_tipo_apo") & "'", conn)
    
    'ARRAY DATOS DEL APODERADO
    strDatApo(0) = Me.txt_rut_apo: strDatApo(1) = Me.txt_dig_apo
    strDatApo(2) = Me.txt_nom_Apo: strDatApo(3) = Me.TXT_APP_APO
    strDatApo(4) = Me.txt_apm_apo: strDatApo(5) = Me.txt_dir_apo
    strDatApo(6) = Me.cmb_reg_apo: strDatApo(7) = Me.cmb_com_apo
    strDatApo(8) = Me.txt_fon_apo: strDatApo(9) = Me.txt_cel_apo
    strDatApo(10) = Me.cmb_niv_apo: strDatApo(11) = Me.cmb_par_apo
    strDatApo(12) = Me.txt_pro_apo: strDatApo(13) = Me.txt_emp_apo
    strDatApo(14) = Me.txt_fon_emp_apo: strDatApo(15) = Me.cmb_con_apo
    strDatApo(16) = Me.cmb_tip_apo
    
    
    'DATOS DE LA MADRE
    Me.txt_mad_Ant.Text = RsAux("nom_mad_alu")
    Me.txt_dir_ant.Text = RsAux("dir_mad_alu")
    Me.txt_fon_ant.Text = RsAux("fon_mad_alu")
    
    ' se debe seleccionar del listbox el nivel educacional de la madre
    
    Me.cmb_niv_ant = RsAux("nivel_educ_mad_alu")
    'Select Case rsaux("nivel_educ_mad_alu")
    '    Case "Enseñanza Basica Completa"
    '        Me.cmb_niv_ant.ListIndex = 0
   '     Case "Enseñanza Basica Incompleta"
   '         Me.cmb_niv_ant.ListIndex = 1
   '     Case "Enseñanza Media  Completa"
   '         Me.cmb_niv_ant.ListIndex = 2
   '     Case "Enseñanza Media Incompleta"
   '         Me.cmb_niv_ant.ListIndex = 3
   '     Case "Estudios Superiores"
   '         Me.cmb_niv_ant.ListIndex = 4
   ' End Select
    
    
    
    Me.txt_emp_ant.Text = RsAux("empresa_mad_alu")
    Me.txt_rut_ant.Text = separarut(RsAux("rut_mad_alu"))
    Me.txt_diG_MAD.Text = separadigito(RsAux("rut_mad_alu"))
    Me.cmb_comu_ant.Text = devuelvecampo("codigos__geograficos", "", "comuna", "cod_geo = '" & RsAux("comuna_mad_alu") & "'", conn)
    Me.cmb_reg_ant.Text = devuelvecampo("codigos__geograficos", "", "provincia", "cod_geo = '" & RsAux("comuna_mad_alu") & "'", conn)
    Me.txt_pro_ant.Text = RsAux("profesion_mad_alu")
    Me.txt_emp_fon_ant.Text = RsAux("empresa_fon_mad_alu")
    Me.txt_emp_cel_ant.Text = IIf(IsNull(RsAux!cel_mad_alu), "", RsAux!cel_mad_alu)
    
    'DATOS DEL PADRE
    Me.txt_nom2_ant.Text = RsAux("nom_pad_alu")
    Me.txt_di2_ant.Text = RsAux("dir_pad_alu")
    Me.txt_fo2_ant.Text = RsAux("fon_pad_alu")
        
    Me.cmb_ni2_ant = RsAux("nivel_educ_pad_alu")
    'Select Case rsaux("nivel_educ_pad_alu")
    '    Case "Enseñanza Basica Completa"
    '        Me.cmb_ni2_ant.ListIndex = 0
    '    Case "Enseñanza Basica Incompleta"
    '        Me.cmb_ni2_ant.ListIndex = 1
    '    Case "Enseñanza Media  Completa"
    '        Me.cmb_ni2_ant.ListIndex = 2
    '    Case "Enseñanza Media Incompleta"
    '        Me.cmb_ni2_ant.ListIndex = 3
    '    Case "Estudios Superiores"
    '        Me.cmb_ni2_ant.ListIndex = 4
    'End Select
    
    Me.txt_em2_ant.Text = RsAux("empresa_pad_alu")
    Me.txt_ru2_ant.Text = separarut(RsAux("rut_pad_alu"))
    Me.txt_dig_pad.Text = separadigito(RsAux("rut_pad_alu"))
    Me.cmb_comu2_ant.Text = devuelvecampo("codigos__geograficos", "", "comuna", "cod_geo = '" & RsAux("comuna_pad_alu") & "'", conn)
    Me.cmb_reg2_ant.Text = devuelvecampo("codigos__geograficos", "", "provincia", "cod_geo = '" & RsAux("comuna_pad_alu") & "'", conn)
    Me.txT_pr2_ant.Text = RsAux("profesion_pad_alu")
    Me.txt_emp_fo2_ant.Text = RsAux("empresa_fon_pad_alu")
    Me.txt_emp_cel2_ant.Text = IIf(IsNull(RsAux("cel_pad_alu")), "", RsAux("cel_pad_alu"))
    
    
    'ANTECEDENTES FAMILIARES
    Me.cmb_pad_ant.Text = RsAux("est_pad")
    Me.cmb_alu_ant.Text = RsAux("alu_viv_con")
    Me.cmb_cas_ant.Text = RsAux("grupo_viv_en")
    
    Me.txt_ing_ant.Text = RsAux("ing_fam")
    Me.cmb_pro_ant.Text = RsAux("sit_cas")
    
    
    'AQUI VAN DATOS DE LOS HERMANOS
    
       
    
    'CERTIFICADOS ENTREGADOS
    If RsAux("v_cer_nac") Then
        Me.Che_cer_doc.Value = 1
    Else
        Me.Che_cer_doc.Value = 0
    End If
    If RsAux("v_inf_not_par") Then
        Me.che_inf_doc.Value = 1
    Else
        Me.che_inf_doc.Value = 0
    End If
    If RsAux("v_cer_est_ult_cur") Then
        Me.che_par_doc.Value = 1
    Else
        Me.che_par_doc.Value = 0
    End If
    If RsAux("v_fotos") Then
        Me.che_fot_doc.Value = 1
    Else
        Me.che_fot_doc.Value = 0
    End If
    ant_docher = 3
    If RsAux("ind_hermano") = "SI" Then
        Me.che_doc_her.Value = 1
        ant_docher = 1
        logher = False
    Else
        Me.che_doc_her.Value = 0
        ant_docher = 0
        logher = False
    End If
    
    
        
    'CARNE ESCOLAR , FORMULARIO EXIM. RELIGION
    If RsAux("vi_sol_car_esc") Then
        Me.cmb_sol_ant.ListIndex = 0
    Else
        Me.cmb_sol_ant.ListIndex = 1
    End If
    If RsAux("vi_for_exi_rel") Then
        Me.cmb_com_ant.ListIndex = 0
    Else
        Me.cmb_com_ant.ListIndex = 1
    End If
    If RsAux!ind_embarazo = "1" Then Cmb_embarazo.ListIndex = 0
    If RsAux!ind_embarazo = "2" Then Cmb_embarazo.ListIndex = 1

    If RsAux!indigena = "1" Then Cmb_indigena.ListIndex = 0
    If RsAux!indigena = "2" Then Cmb_indigena.ListIndex = 1
    
    

    'DATOS DE POSTULACION
    'Me.DTP_FEC_INS.Value = rsaux("vii_fec_ins")
    
    If IsNull(RsAux("vii_nom_encargado")) Then
        Me.txt_enc_alu.Text = ""
    Else
        Me.txt_enc_alu.Text = RsAux("vii_nom_encargado")
    End If
    
    'CONSULTAR EN TABLA POSTULACIONES
    RsAux.Close
    'rsaux.CursorLocation = adUseClient
    RsAux.Open "select * from postulaciones where ci_alu ='" & rutalumno & "' order by Fec_pos DESC", conn
    If RsAux.RecordCount > 0 Then
        'Me.DTP_FEC_EVA.Value = rsaux("vii_fec_eval")
        Me.DTP_FEC_EVA.Value = RsAux("vii_hor_eval")
        'MsgBox rsaux("VII_HOR_EVAL")
        Me.DTP_HOR_EVA.Value = IIf(IsNull(RsAux("VII_HOR_EVAL")), Time, Format(RsAux("VII_HOR_EVAL"), "HH:MM"))
        Me.DTP_FEC_INS.Value = RsAux("fec_pos")
        fechainscrip = RsAux("fec_pos")
        'Anhopostulacion = agno_label
        Anhopostulacion = RsAux("anno_pos_alu")
        Anhopostulacion = str(agno_label_ant)
        Me.lbl_mem.Caption = "FICHA DE POSTULACIÓN E INSCRIPCIÓN " + Anhopostulacion
        Me.lbl_info.Caption = "El Alumno postulo el Año " & RsAux("anno_pos_alu") & " ,"
        Me.lbl_info.Caption = Me.lbl_info.Caption & "en este momento UD lo esta cambiando para el año " & Anhopostulacion2
        Me.Text1.Text = lbl_info.Caption
        Me.txt_eda_alu.Text = calculaEdad(dtp_fec_alu.Value, Format("03/30/" & Anhopostulacion, "dd/mm/yyyy")) ' PARAMETRIZAR
    
        Me.BTN_CAMBIA_ANHO.Visible = True
        
        'p.anno_pos_alu,
    ' Las tres lineas quue vienen estaban fuera del endif
        If ExistReg("repitentes", "ci_alu ='" & rutalumno & "' and cod_ens = '" & CodModalidad & "' and num_gra = '" & NumGra & "' and anno_rep ='" & Anhopostulacion - 1 & "'", conn) Then
            Me.cmb_repitente.ListIndex = 0
        End If
    End If
    RsAux.Close
    Set RsFuncion = New ADODB.Recordset
    RsFuncion.CursorLocation = adUseClient
    'RsFuncion.Open "select m.num_gra, c.cod_des, j.des_jor from matriculas m, jornadas j, codigos_ensenanza c where m.cod_jor=j.cod_jor and m.cod_ens=c.cod_ens and ci_alu ='" & rutalumno & "' and anno_mat='" & Anhopostulacion & "' and ucase(activo_alu)='SI'", conn
    RsFuncion.Open "select m.num_gra, c.cod_des, j.des_jor from matriculas m, jornadas j, codigos_ensenanza c where m.cod_jor=j.cod_jor and m.cod_ens=c.cod_ens and ci_alu ='" & rutalumno & "' and ucase(activo_alu)='SI' and anno_mat='" & Anhopostulacion2 & "'", conn
    If RsFuncion.RecordCount > 0 Then
        If UCase(RsFuncion!cod_des) = "K" Or UCase(RsFuncion!cod_des) = "PK" Then
            curso = UCase(RsFuncion!cod_des)
        ElseIf UCase(RsFuncion!cod_des) = "EB" Or UCase(RsFuncion!cod_des) = "EM" Then
            curso = UCase(RsFuncion!Num_Gra) & " " & UCase(RsFuncion!cod_des)
        End If
        Me.txt_estado_alu.Text = "MATRICULADO EN " & curso & " " & UCase(RsFuncion!des_jor)
    Else
        Me.txt_estado_alu.Text = "POSTULANDO"
    
    End If
    RsFuncion.Close
    Set RsFuncion = Nothing
     
     

    Me.lst_app_alu.Visible = False
    Me.Btn_Eli_0.Enabled = True
    Me.txt_app_alu.SetFocus
    Me.txt_app_alu.Enabled = True
    Me.txt_nom_alu.Enabled = True
    Me.txt_rut_alu.Enabled = False
    Me.txT_dig_alu.Enabled = False
    Me.txt_dir_alu.Enabled = True
    Me.cmb_com_alu.Enabled = True
    Me.txt_fon_alu.Enabled = True
    Me.SSTab1.TabVisible(1) = True
    Me.SSTab1.TabVisible(2) = True
    Me.SSTab1.TabVisible(3) = True
    Me.SSTab1.TabVisible(4) = True
    Me.SSTab1.TabVisible(5) = True
    Me.SSTab1.TabVisible(6) = True
    'Anhopostulacion = str(agno_label_ant)
    Me.lbl_mem.Caption = "FICHA DE POSTULACIÓN E INSCRIPCIÓN " + Anhopostulacion
    pasopor = True
    
    SendKeys "{home}"
    
End If

Me.Btn_Eli_0.Enabled = True
End Sub


Private Sub lst_app_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 Call lst_app_alu_DblClick
 'Me.Txt_des_tipoapo.Text = Me.Lst_des_tipoapo.List(Me.Lst_des_tipoapo.ListIndex)
End If
End Sub



Private Sub msfeceval_Click()
  Dim pasarfecha As String
    Me.msfeceval.Col = 1
    Me.DTP_FEC_EVA.Value = Me.msfeceval.Text
    Me.msfeceval.Col = 2
    Me.DTP_HOR_EVA.Value = Me.msfeceval.Text
    Me.msfeceval.Col = 0
    Me.msfeceval.ColSel = Me.msfeceval.Cols - 1
End Sub

Private Sub msfeceval_DblClick()
    Dim pasarfecha As String
    Me.msfeceval.Col = 1
    Me.DTP_FEC_EVA.Value = Me.msfeceval.Text
    Me.msfeceval.Col = 2
    Me.DTP_HOR_EVA.Value = Me.msfeceval.Text
    
    Me.msfeceval.ColSel = Me.msfeceval.Cols - 1
End Sub

Private Sub opt_anho_select_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then Call btn_aceptar_anho_Click
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
'MsgBox ("" & SSTab1.Tab)
If PreviousTab = 1 Then
   If Me.cmb_par_apo.Text = "Padre" Then
      Image2_Click
   ElseIf Me.cmb_par_apo.Text = "Madre" Then
      Image1_Click
   End If
End If
    
If SSTab1.Tab = 3 Then
'If PreviousTab = 2 Then
    'Me.Grd_Her_Ant.Clear
    rs.CursorLocation = adUseClient
    rs.Open "select nom_her, ape_pat_her, ape_mat_her ,fec_nac_her from hermanos where ci_alu = '" & txt_rut_alu.Text + "-" + txT_dig_alu.Text & "'", conn
    If rs.RecordCount > 0 Then
        c = 1
        Me.Grd_Her_Ant.Rows = rs.RecordCount + 1
        While Not rs.EOF
            Me.Grd_Her_Ant.Row = c
            Me.Grd_Her_Ant.Col = 0
            Me.Grd_Her_Ant.Text = rs("ape_pat_her")
            Me.Grd_Her_Ant.Col = 1
            Me.Grd_Her_Ant.Text = rs("ape_mat_her")
            Me.Grd_Her_Ant.Col = 2
            Me.Grd_Her_Ant.Text = rs("nom_her")
            Me.Grd_Her_Ant.Col = 3
            Me.Grd_Her_Ant.Text = rs("fec_nac_her")
            Me.Grd_Her_Ant.Col = 4
            Me.Grd_Her_Ant.Text = calculaEdad(rs("fec_nac_her"), Date)
            rs.MoveNext
            c = c + 1
        Wend
    End If
    hermanosya = rs.RecordCount
    rs.Close
    'Me.cmb_pad_ant.Enabled = True
    'Me.cmb_pad_ant.SetFocus
    If Me.Grd_Her_Ant.Rows >= 1 And Me.Grd_Her_Ant.Text = "" Then
        Me.txt_contador.Text = "0"
        Me.BTN_ELI_ANT.Enabled = False
    Else
        Me.txt_contador.Text = Grd_Her_Ant.Rows - 1
        Me.BTN_ELI_ANT.Enabled = True
    End If
    
'ElseIf SSTab1.Tab >= 4 Then
'    Call btn_sgte_3_Click

ElseIf SSTab1.Tab = 5 Then
    If Me.cmb_sex_alu = "M" Then
        Me.lblembarazo.Enabled = False
        Me.Cmb_embarazo.ListIndex = 1
        Me.Cmb_embarazo.Enabled = False
        
    Else
        Me.lblembarazo.Enabled = True
        Me.Cmb_embarazo.Enabled = True
    End If
    If Anhopostulacion = Anno Then
        Me.lblrepitencia.Enabled = True
        Me.cmb_repitente.Enabled = True
    ElseIf Anhopostulacion = Anno + 1 Then
        Me.cmb_repitente.ListIndex = 1
        Me.lblrepitencia.Enabled = False
        Me.cmb_repitente.Enabled = False
    End If
End If
End Sub



Private Sub txt_ale_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_eme_alu.Enabled = True
    Me.txt_eme_alu.SetFocus
End If
End Sub

Private Sub TXT_AM1_ANT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.TXT_AM1_ANT.Text)) <> 0 Then
    Me.Dtp_fec_her.Enabled = True
    Me.Dtp_fec_her.SetFocus
Else
    Me.TXT_AM1_ANT.SetFocus
End If
End Sub







Private Sub TXT_AP1_ANT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.TXT_AP1_ANT.Text)) <> 0 Then
    Me.TXT_AM1_ANT.Enabled = True
    TXT_AM1_ANT.SetFocus
Else
    Me.TXT_AP1_ANT.SetFocus
End If
End Sub






Private Sub txt_apm_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_apm_alu.Text)) <> 0 Then
    Me.txt_nom_alu.Enabled = True
    Me.txt_nom_alu.SetFocus
Else
    Me.txt_apm_alu.SetFocus
End If
End Sub

Private Sub txt_apM_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_apm_apo.Text)) <> 0 Then
    Me.txt_dir_apo.Enabled = True
    txt_dir_apo.SetFocus
Else
    Me.txt_apm_apo.SetFocus
End If
End Sub

Private Sub txt_app_alu_Change()
Dim i As Integer
txt_app_alu.Text = UCase(txt_app_alu.Text)
i = Len(Trim(txt_app_alu.Text))
txt_app_alu.SelStart = i
If Busqueda = 1 Then
rs.CursorLocation = adUseClient
lst_app_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_app_alu.Text <> "" Then
      Criterio = "'" + Me.txt_app_alu.Text + Consulta + "%'"
      rs.Open "SELECT * FROM postulantes where ape_pat_alu like " & Criterio & " order by ape_pat_alu, ape_mat_alu, nom_alu", conn
        lst_app_alu.Visible = False
        If rs.RecordCount > 0 Then
            ReDim aalumnos(rs.RecordCount)
            Indi = 0
            X = 0
            While Not rs.EOF
                'Me.Txt_cod_TipoApo.Text = rs(0)
                lst_app_alu.AddItem rs("ape_pat_alu") + " " + rs("ape_mat_alu") + " " + rs("nom_alu")
                aalumnos(X) = rs("ci_alu")
                lst_app_alu.Visible = True
                rs.MoveNext
                X = X + 1
            Wend
        Else
            Indi = 0
        End If
        rs.Close
    Else
    lst_app_alu.Visible = False
    End If
End If
End If
End Sub

Private Sub txt_app_alu_KeyPress(KeyAscii As Integer)
'busqueda = 1
If KeyAscii = 27 Then
    'Me.txt_ape_pro.Text = ""
    'Me.txt_nom_pro.Text = ""
    'Me.txt_rut_pro.Text = ""
    'Me.cmb_cod_pro.Text = ""
    lst_app_alu.Visible = False
    KeyAscii = 0
ElseIf KeyAscii = 13 And Len(Trim(Me.txt_app_alu.Text)) <> 0 And Busqueda = 0 Then
    'foco al nombre
    Me.txt_apm_alu.Enabled = True
    Me.txt_apm_alu.SetFocus
    Me.lst_app_alu.Visible = False
    Me.lbl_mem.Caption = "FICHA DE POSTULACIÓN E INSCRIPCIÓN " + Anhopostulacion2
    Anhopostulacion3 = Anhopostulacion2

    'Me.Txt_cod_mod.Enabled = True
    'Me.Txt_cod_mod.SetFocus
ElseIf KeyAscii = 13 And Len(Trim(Me.txt_app_alu.Text)) <> 0 And Busqueda = 1 And Not valorenlista(Form_ficha.lst_app_alu, txt_app_alu.Text) Then
    Me.txt_apm_alu.Enabled = True
    Me.txt_apm_alu.SetFocus
    Me.lst_app_alu.Visible = False


ElseIf ((Chr(KeyAscii) >= "A" And Chr(KeyAscii) <= "Z") Or (Chr(KeyAscii) >= "a" And Chr(KeyAscii) <= "z")) Then Exit Sub
ElseIf (Chr(KeyAscii) = "Ñ" Or Chr(KeyAscii) = "ñ") 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_app_alu.Text = "" Then
        If KeyAscii = 37 Then Exit Sub
End If
    KeyAscii = 0: Exit Sub
End Sub

Private Sub TXT_APP_APO_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.TXT_APP_APO.Text)) <> 0 Then
    Me.txt_apm_apo.Enabled = True
    txt_apm_apo.SetFocus
Else
    Me.TXT_APP_APO.SetFocus
End If
End Sub

Private Sub txt_cel_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_niv_apo.Enabled = True
    Me.cmb_niv_apo.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub









Private Sub txt_contador_Change()
If Me.txt_contador.Text = "0" Then
    Me.BTN_ELI_ANT.Enabled = False
Else
    Me.BTN_ELI_ANT.Enabled = True
End If
End Sub

Private Sub txt_di2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_comu2_ant.Enabled = True
    Me.cmb_comu2_ant.SetFocus
End If
End Sub

Private Sub txT_dig_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txT_dig_alu.Text)) <> 0 Then
    If txT_dig_alu.Text = digito(txt_rut_alu.Text) Then
         Me.Cmb_mod_cur.Enabled = True
         Me.Cmb_mod_cur.SetFocus
         Me.BTN_CAMBIA_ANHO.Visible = True
    Else
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        Me.txT_dig_alu.SetFocus
        SendKeys "{home}+{end}"
    End If
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf Chr(KeyAscii) = "K" Or Chr(KeyAscii) = "k" Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txT_dig_alu_LostFocus()
If ExistReg("postulantes", "ci_alu = '" & Me.txt_rut_alu & "-" & Me.txT_dig_alu & "'", conn) Then
        Me.frame_anho.Visible = False
        Me.frame_sombra.Visible = False
        MsgBox ("El rut del alumno ya existe en el sistema")
        Me.SSTab1.Enabled = True
        Me.txt_rut_alu.SetFocus
        SendKeys "{home}+{end}"
    End If
End Sub

Private Sub txt_dig_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_dig_apo.Text)) <> 0 Then
'    If txt_dig_apo.Text = digito(txt_rut_apo.Text) Then
'        Call cmb_par_apo_Click
        Call txt_dig_apo_LostFocus
        'txt_nom_Apo.Enabled = True
        'txt_nom_Apo.SetFocus
'    Else
'        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
'        Me.txt_dig_apo.SetFocus
'        SendKeys "{home}+{end}"
'    End If
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf Chr(KeyAscii) = "K" Or Chr(KeyAscii) = "k" Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_dig_apo_LostFocus()
Dim RutApo As String
errorapellidos = 0
If Len(Trim(Me.txt_rut_apo.Text)) > 0 And Len(Trim(Me.txt_rut_apo.Text)) <= 9 Then
    If txt_dig_apo.Text = digito(txt_rut_apo.Text) Then
        Me.Frame_apo.Enabled = True
        'If Busqueda = 1 Then 'And Busqueapo = 1 Then
        'If (Me.txt_rut_apo & "-" & Me.txt_dig_apo) <> (Me.txt_rut_alu & "-" & Me.txT_dig_alu) Or ExistReg Then
            If ExistReg("apoderados", "rut_apo = '" & Me.txt_rut_apo & "-" & Me.txt_dig_apo & "'", conn) Then
                'MsgBox ("Apoderado existe en el sistema")
                RsAux.CursorLocation = adUseClient
                RutApo = Me.txt_rut_apo.Text + "-" + Me.txt_dig_apo.Text
                RsAux.Open "SELECT * FROM apoderados where rut_apo = '" & RutApo & "'", conn
                If RsAux.RecordCount > 0 Then
                    Me.txt_nom_Apo.Text = RsAux("noms_apo")
                    Me.TXT_APP_APO.Text = RsAux("ape1_apo")
                    Me.txt_apm_apo.Text = RsAux("ape2_apo")
                    Me.txt_dir_apo.Text = RsAux("dir_apo")
                    Me.cmb_com_apo.Text = devuelvecampo("codigos__geograficos", "", "comuna", "cod_geo = '" & RsAux("comuna_apo") & "'", conn)
                    Me.cmb_reg_apo.Text = devuelvecampo("codigos__geograficos", "", "provincia", "cod_geo = '" & RsAux("comuna_apo") & "'", conn)
                    Me.txt_fon_apo.Text = RsAux("fon_c_apo")
                    Me.txt_cel_apo.Text = RsAux("cel_apo")
                    'Me.cmb_niv_apo = rsaux("nivel_educ_apo")
                    Select Case RsAux("nivel_educ_apo")
                        Case "Enseñanza Basica Completa"
                            Me.cmb_niv_apo.ListIndex = 0
                        Case "Enseñanza Basica Incompleta"
                            Me.cmb_niv_apo.ListIndex = 1
                        Case "Enseñanza Media  Completa"
                            Me.cmb_niv_apo.ListIndex = 2
                        Case "Enseñanza Media Incompleta"
                            Me.cmb_niv_apo.ListIndex = 3
                        Case "Estudios Superiores"
                            Me.cmb_niv_apo.ListIndex = 4
                    End Select
                    Me.txt_emp_apo.Text = RsAux("empresa")
                    Me.txt_pro_apo.Text = RsAux("profesio_apo")
                    Me.txt_fon_emp_apo.Text = RsAux("empresa_fon")
                    Me.cmb_con_apo.Text = devuelvecampo("convenios", "", "des_conv", "cod_conv = '" & RsAux("cod_conv") & "'", conn)
                    Me.cmb_tip_apo.Text = devuelvecampo("tipo_apo", "", "des_tipo_apo", "cod_tipo_apo = '" & RsAux("cod_tipo_apo") & "'", conn)
                    Me.txt_nom_Apo.Enabled = True
                    Me.TXT_APP_APO.Enabled = True
                    Me.txt_apm_apo.Enabled = True
                    Me.txt_dir_apo.Enabled = True
                    Me.cmb_com_apo.Enabled = True
                    Me.txt_fon_apo.Enabled = True
                    Me.txt_cel_apo.Enabled = True
                    Me.cmb_niv_apo.Enabled = True
                    Me.cmb_par_apo.Enabled = True
                    Me.txt_pro_apo.Enabled = True
                    Me.txt_emp_apo.Enabled = True
                    Me.txt_fon_emp_apo.Enabled = True
                    Me.cmb_con_apo.Enabled = True
                    Me.cmb_tip_apo.Enabled = True
                    Me.Btn_Anterior_1.Enabled = True
                    Me.btn_sgte_1.Enabled = True
                    'DEVOLVER PARENTESCO
                    Me.cmb_par_apo = devuelvecampo("apo_x_alu", "", "parent_apo", "ci_alu ='" & Me.txt_rut_alu + "-" + Me.txT_dig_alu & "' and rut_apo ='" & RutApo & "'", conn)
                    'puse la asignacion de parentesco en esta linea para que el evento click
                    'se ejecute al final de este ciclo.....
                    If errorapellidos = 0 Then
                        Me.btn_sgte_1.SetFocus
                    Else
                        SSTab1.Tab = 1
                        Me.TXT_APP_APO.Enabled = True
                        Me.TXT_APP_APO.SetFocus
                        SendKeys "{home}+{end}"
                    End If
                    Busqueapo = 0
                    RsAux.Close
                Else
                    RsAux.Close
                End If
            'si encuentra
            Else
                'limpiar los controles de información
                    Me.txt_nom_Apo = ""
                Me.TXT_APP_APO = ""
                Me.txt_apm_apo = ""
                Me.txt_dir_apo = ""
                Me.cmb_com_apo = ""
                Me.cmb_reg_apo = ""
                Me.txt_fon_apo = ""
                Me.txt_cel_apo = ""
                Me.cmb_niv_apo = ""
                Me.cmb_par_apo = ""
                'Me.cmb_niv_apo.ListIndex = 5
                'Me.cmb_par_apo.ListIndex = 8
                Me.txt_pro_apo = ""
                Me.txt_emp_apo = ""
                Me.txt_fon_emp_apo = ""
                Me.cmb_con_apo = ""
                Me.cmb_tip_apo = ""
                Me.txt_nom_Apo.Enabled = True
                Me.TXT_APP_APO.Enabled = False
                Me.txt_apm_apo.Enabled = False
                Me.txt_dir_apo.Enabled = False
                Me.cmb_com_apo.Enabled = False
                Me.txt_fon_apo.Enabled = False
                Me.txt_cel_apo.Enabled = False
                Me.cmb_niv_apo.Enabled = False
                Me.cmb_par_apo.Enabled = False
                Me.txt_pro_apo.Enabled = False
                Me.txt_emp_apo.Enabled = False
                Me.txt_fon_emp_apo.Enabled = False
                Me.cmb_con_apo.Enabled = False
                Me.cmb_tip_apo.Enabled = False
                Me.btn_sgte_1.Enabled = False
                Me.txt_nom_Apo.SetFocus
                
            'si no encuentra
            End If
        'Else
        '    MsgBox ("Rut de apoderado no puede ser igual al del alumno")
        'End If
        Call cmb_par_apo_Click
        txt_nom_Apo.Enabled = True
        txt_nom_Apo.SetFocus
        Me.txt_rut_apo.Enabled = False: Me.txt_dig_apo.Enabled = False
        Rut_Apo_Ok = True
    
    Else
        Rut_Apo_Ok = False
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        Me.txt_rut_apo.SetFocus
        SendKeys "{home}+{end}"
    End If
Else
    Me.txt_rut_apo.SetFocus
End If
End Sub

Private Sub txt_diG_MAD_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_diG_MAD.Text)) <> 0 Then
    If txt_diG_MAD.Text = digito(txt_rut_ant.Text) Then
        Me.txt_mad_Ant.Enabled = True
        txt_mad_Ant.SetFocus
    Else
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        Me.txt_diG_MAD.SetFocus
        SendKeys "{home}+{end}"
    End If
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf Chr(KeyAscii) = "K" Or Chr(KeyAscii) = "k" Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_dig_pad_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_dig_pad.Text)) <> 0 Then
    If txt_dig_pad.Text = digito(txt_ru2_ant.Text) Then
        Me.txt_nom2_ant.Enabled = True
        txt_nom2_ant.SetFocus
    Else
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        Me.txt_dig_pad.SetFocus
        SendKeys "{home}+{end}"
    End If
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf Chr(KeyAscii) = "K" Or Chr(KeyAscii) = "k" Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_dir_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_dir_alu.Text)) <> 0 Then
    Me.cmb_com_alu.Enabled = True
    Me.cmb_com_alu.SetFocus
End If
End Sub

Private Sub txt_dir_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_comu_ant.Enabled = True
    cmb_comu_ant.SetFocus
End If
End Sub

Private Sub txt_dir_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_dir_apo.Text)) Then
    cmb_com_apo.Enabled = True
    cmb_com_apo.SetFocus
Else
    Me.txt_dir_apo.SetFocus
End If
End Sub

Private Sub txt_ed1_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_ed1_ant.Text)) <> 0 Then
    BTN_ACE_ANT.Enabled = True
    BTN_ACE_ANT.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub



Private Sub txt_em2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_emp_fo2_ant.Enabled = True
    txt_emp_fo2_ant.SetFocus
End If
End Sub


Private Sub txt_eme_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    txt_fon_eme_alu.Enabled = True
    txt_fon_eme_alu.SetFocus
End If
End Sub

Private Sub txt_emp_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_emp_fon_ant.Enabled = True
    txt_emp_fon_ant.SetFocus
End If
End Sub

Private Sub txt_emp_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_fon_apo.Enabled = True
    Me.txt_fon_emp_apo.Enabled = True
    txt_fon_emp_apo.SetFocus
End If
End Sub

Private Sub txt_emp_cel_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_ru2_ant.Enabled = True
    Me.txt_ru2_ant.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub



Private Sub txt_emp_cel2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.btn_sgte_2.Enabled = True
    Me.btn_sgte_2.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_emp_fo2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_emp_cel2_ant.Enabled = True
    Me.txt_emp_cel2_ant.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_emp_fon_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_emp_cel_ant.Enabled = True
    Me.txt_emp_cel_ant.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_enf_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Or KeyAscii = 7 Then
    Me.txt_tra_alu.Enabled = True
    Me.txt_tra_alu.SetFocus
End If
End Sub


Private Sub txt_estado_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.Btn_sgte_0.Enabled = True
    Me.Btn_sgte_0.SetFocus
End If
End Sub

Private Sub txt_fo2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_ni2_ant.Enabled = True
    cmb_ni2_ant.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_fon_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_fon_alu.Text)) <> 0 Then
    Me.txt_pro_alu.Enabled = True
    Me.txt_pro_alu.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_fon_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_niv_ant.Enabled = True
    cmb_niv_ant.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_fon_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_fon_apo.Text)) <> 0 Then
    Me.txt_cel_apo.Enabled = True
    txt_cel_apo.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_fon_eme_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_exi_alu.Enabled = True
    Me.cmb_exi_alu.SetFocus
End If
End Sub

Private Sub txt_fon_emp_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.cmb_con_apo.Enabled = True
    cmb_con_apo.SetFocus
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_ing_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_ing_ant.Text)) <> 0 Then
    Me.frame_her_ant.Enabled = True
    Me.txt_no1_ant.Enabled = True
    Me.txt_no1_ant.SetFocus
    Me.btn_sgte_3.Enabled = True
ElseIf (Chr(KeyAscii) >= "0" And Chr(KeyAscii) <= "9") Then Exit Sub
ElseIf KeyAscii = 8 Then Exit Sub
ElseIf KeyAscii = 32 Then Exit Sub
End If
KeyAscii = 0
End Sub

Private Sub txt_mad_Ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_dir_ant.Enabled = True
    txt_dir_ant.SetFocus
Else
    Me.txt_mad_Ant.SetFocus
End If
End Sub

Private Sub cmd_nac_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.Cmd_nac_alu.Text)) <> 0 Then
    Me.txt_dir_alu.Enabled = True
    Me.txt_dir_alu.SetFocus
End If
End Sub








Private Sub txt_no1_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_no1_ant.Text)) <> 0 Then
    Me.TXT_AP1_ANT.Enabled = True
    TXT_AP1_ANT.SetFocus
Else
    Me.txt_no1_ant.SetFocus
End If
End Sub


Private Sub txt_nom_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_nom_alu.Text)) <> 0 Then
    If Busqueda = 0 Then
        Me.Cmb_mod_cur.Enabled = True
        Me.Cmb_mod_cur.SetFocus
    Else
        Me.txt_rut_alu.Enabled = True
        Me.txt_rut_alu.SetFocus
    End If
Else
    Me.txt_nom_alu.SetFocus
End If
End Sub

Private Sub txt_nom_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_nom_Apo.Text)) <> 0 Then
    Me.TXT_APP_APO.Enabled = True
    TXT_APP_APO.SetFocus
Else
    Me.txt_nom_Apo.SetFocus
End If
End Sub

Private Sub txt_nom2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_di2_ant.Enabled = True
    txt_di2_ant.SetFocus
End If
End Sub



Private Sub txT_pr2_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_em2_ant.Enabled = True
    txt_em2_ant.SetFocus
End If
End Sub

Private Sub txt_pro_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_pro_alu.Text)) Then
    Me.txt_enf_alu.Enabled = True
    Me.txt_enf_alu.SetFocus
End If
End Sub

Private Sub txt_pro_ant_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_emp_ant.Enabled = True
    txt_emp_ant.SetFocus
End If
End Sub

Private Sub txt_pro_apo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Len(Trim(Me.txt_pro_apo.Text)) <> 0 Then
    Me.txt_emp_apo.Enabled = True
    Me.txt_emp_apo.SetFocus
End If
End Sub

Private Sub txt_ru2_ant_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_ru2_ant.Text) And Len(Trim(txt_ru2_ant.Text)) > 6 Then
    Me.txt_dig_pad.Enabled = True
    Me.txt_dig_pad.SetFocus
  ElseIf Len(Trim(Me.txt_ru2_ant.Text)) >= 1 And Len(Trim(Me.txt_ru2_ant.Text)) <= 6 Then
  MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
    Me.txt_dig_pad.Text = ""
    txt_ru2_ant.Text = ""
    Me.txt_ru2_ant.SetFocus
    SendKeys "{home}+{end}"
End If
End If
KeyAscii = 0
End Sub

Private Sub txt_ru2_ant_LostFocus()
    Me.txt_ru2_ant.Text = Format(Me.txt_ru2_ant.Text, "00000000")
End Sub

Private Sub txt_rut_alu_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_rut_alu.Text) And Len(Trim(txt_rut_alu.Text)) > 6 Then
    txt_rut_alu = Format(txt_rut_alu, "00000000")
    Me.txT_dig_alu.Enabled = True
    Me.txT_dig_alu.SetFocus
    
ElseIf Len(Trim(Me.txt_rut_alu.Text)) >= 1 And Len(Trim(Me.txt_rut_alu.Text)) <= 6 Then
  MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
    Me.txT_dig_alu.Text = ""
    txt_rut_alu.Text = ""
    Me.txt_rut_alu.SetFocus
    SendKeys "{home}+{end}"
End If
End If
KeyAscii = 0
End Sub

Private Sub txt_rut_alu_LostFocus()
    'Elimina el maldito problema de Zero
    Me.txt_rut_alu.Text = Format(txt_rut_alu.Text, "00000000")
End Sub

Private Sub txt_rut_ant_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_rut_ant.Text) And Len(Trim(txt_rut_ant.Text)) > 0 Then
    txt_rut_ant = Format(txt_rut_ant, "00000000")
    Me.txt_diG_MAD.Enabled = True
    Me.txt_diG_MAD.SetFocus
ElseIf Len(Trim(Me.txt_rut_ant.Text)) >= 1 And Len(Trim(Me.txt_rut_ant.Text)) <= 6 Then
    MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
    Me.txt_diG_MAD.Text = ""
    txt_rut_ant.Text = ""
    Me.txt_rut_ant.SetFocus
    SendKeys "{home}+{end}"
End If
End If
KeyAscii = 0
End Sub

Private Sub txt_rut_ant_LostFocus()
    Me.txt_rut_ant.Text = Format(Me.txt_rut_ant.Text, "00000000")
End Sub

Private Sub txt_rut_apo_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_rut_apo.Text) And Len(Trim(txt_rut_apo.Text)) > 0 Then
    txt_rut_apo = Format(txt_rut_apo, "00000000")
    Me.txt_dig_apo.Enabled = True
    Me.txt_dig_apo.SetFocus
ElseIf Len(Trim(Me.txt_rut_apo.Text)) >= 1 And Len(Trim(Me.txt_rut_apo.Text)) <= 6 Then
     MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
     Me.txt_dig_apo.Text = ""
     txt_rut_apo.Text = ""
     Me.txt_rut_apo.SetFocus
     SendKeys "{home}+{end}"
End If
End If
KeyAscii = 0
End Sub

Private Sub txt_rut_apo_LostFocus()
    'por el Zero
    Me.txt_rut_apo.Text = Format(Me.txt_rut_apo.Text, "00000000")
End Sub

Private Sub txt_tra_alu_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Me.txt_ale_alu.Enabled = True
    Me.txt_ale_alu.SetFocus
End If
End Sub

