VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form_NFicha_Alumno 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Datos de Alumno"
   ClientHeight    =   8340
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   14475
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   9.75
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form_NFicha_Alumno.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   8340
   ScaleWidth      =   14475
   Begin VB.Frame Frame4 
      Caption         =   "Otros Antecedentes"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   3495
      Left            =   12000
      TabIndex        =   31
      Top             =   120
      Width           =   2175
      Begin VB.ComboBox cmb_embara 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2A8B2
         Left            =   480
         List            =   "Form_NFicha_Alumno.frx":2A8BC
         Style           =   2  'Dropdown List
         TabIndex        =   35
         Top             =   3960
         Visible         =   0   'False
         Width           =   1095
      End
      Begin VB.ComboBox cmb_indi 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2A8C8
         Left            =   480
         List            =   "Form_NFicha_Alumno.frx":2A8D2
         Style           =   2  'Dropdown List
         TabIndex        =   34
         Top             =   2880
         Width           =   1095
      End
      Begin VB.ComboBox cmb_eximreg 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2A8DE
         Left            =   480
         List            =   "Form_NFicha_Alumno.frx":2A8E9
         Style           =   2  'Dropdown List
         TabIndex        =   33
         Top             =   2040
         Width           =   1095
      End
      Begin VB.ComboBox cmb_alucar 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2A8F5
         Left            =   480
         List            =   "Form_NFicha_Alumno.frx":2A900
         Style           =   2  'Dropdown List
         TabIndex        =   32
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Llbl_com_ant 
         Alignment       =   2  'Center
         Caption         =   "Eximisión de Religión"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   120
         TabIndex        =   56
         Top             =   1560
         Width           =   1935
      End
      Begin VB.Label lbl_sol_ant 
         Alignment       =   2  'Center
         Caption         =   "Solicita Carné Escolar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   55
         Top             =   600
         Width           =   1935
      End
      Begin VB.Label lblembarazo 
         Alignment       =   2  'Center
         Caption         =   "Alumna Embarazada"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   54
         Top             =   3480
         Visible         =   0   'False
         Width           =   1815
      End
      Begin VB.Label Label21 
         Alignment       =   2  'Center
         Caption         =   "Alumno(a) Indígena"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   53
         Top             =   2520
         Width           =   1695
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "&Cancelar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   12360
      Picture         =   "Form_NFicha_Alumno.frx":2A90C
      Style           =   1  'Graphical
      TabIndex        =   37
      Top             =   5760
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Guardar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   12360
      Picture         =   "Form_NFicha_Alumno.frx":2AC74
      Style           =   1  'Graphical
      TabIndex        =   36
      Top             =   4800
      Width           =   1455
   End
   Begin VB.Frame Frame3 
      Caption         =   "Enfermedades y Tratamientos"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   2535
      Left            =   120
      TabIndex        =   45
      Top             =   5640
      Width           =   11535
      Begin VB.ComboBox CboTipoF 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2B2CD
         Left            =   6105
         List            =   "Form_NFicha_Alumno.frx":2B2D7
         TabIndex        =   29
         Top             =   1860
         Width           =   855
      End
      Begin VB.TextBox fono_eme 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   8160
         MaxLength       =   8
         TabIndex        =   30
         Top             =   1860
         Width           =   1215
      End
      Begin VB.TextBox emegencia 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   28
         Top             =   1920
         Width           =   4695
      End
      Begin VB.TextBox alergias 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   5160
         TabIndex        =   27
         Top             =   1320
         Width           =   4455
      End
      Begin VB.TextBox tratamiento 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   26
         Top             =   1320
         Width           =   4695
      End
      Begin VB.TextBox enfermedades 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   25
         Top             =   720
         Width           =   9375
      End
      Begin VB.Label LblTipoT 
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   7200
         TabIndex        =   70
         Top             =   1875
         Width           =   615
      End
      Begin VB.Label Label30 
         AutoSize        =   -1  'True
         Caption         =   "Tipo de Fono:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   5145
         TabIndex        =   69
         Top             =   1725
         Width           =   975
      End
      Begin VB.Label Label20 
         AutoSize        =   -1  'True
         Caption         =   "Fono: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   7830
         TabIndex        =   50
         Top             =   1665
         Width           =   510
      End
      Begin VB.Label Label19 
         Caption         =   "En Caso de Emergencia llamar a: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   49
         Top             =   1680
         Width           =   2775
      End
      Begin VB.Label Label18 
         Caption         =   "Alergias que Tiene:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5160
         TabIndex        =   48
         Top             =   1080
         Width           =   2655
      End
      Begin VB.Label Label17 
         Caption         =   "Tratamiento a Seguir:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   47
         Top             =   1080
         Width           =   2655
      End
      Begin VB.Label Label16 
         Caption         =   "Enfermedades que tiene o ha tenido:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   46
         Top             =   480
         Width           =   3615
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Dirección"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1935
      Left            =   120
      TabIndex        =   38
      Top             =   3600
      Width           =   11535
      Begin VB.ComboBox cmbcomuna 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2B2E8
         Left            =   5160
         List            =   "Form_NFicha_Alumno.frx":2B2EA
         Sorted          =   -1  'True
         Style           =   2  'Dropdown List
         TabIndex        =   20
         Top             =   600
         Width           =   2175
      End
      Begin VB.TextBox email 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2520
         TabIndex        =   23
         Top             =   1320
         Width           =   2415
      End
      Begin VB.TextBox clprocede 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   5160
         TabIndex        =   24
         Top             =   1320
         Width           =   4455
      End
      Begin VB.TextBox fono 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   13322
            SubFormatType   =   1
         EndProperty
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         MaxLength       =   12
         TabIndex        =   22
         Top             =   1320
         Width           =   2055
      End
      Begin VB.TextBox region 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   7800
         TabIndex        =   21
         Top             =   600
         Width           =   2055
      End
      Begin VB.TextBox direccion 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   19
         Top             =   600
         Width           =   4695
      End
      Begin VB.Label Label15 
         Caption         =   "E-Mail:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   2520
         TabIndex        =   44
         Top             =   1080
         Width           =   1695
      End
      Begin VB.Label Label14 
         Caption         =   "Colegio de procedencia:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5160
         TabIndex        =   42
         Top             =   1080
         Width           =   3975
      End
      Begin VB.Label Label13 
         Caption         =   "Fono: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   41
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label11 
         Caption         =   "Provincia: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   8280
         TabIndex        =   1
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label10 
         Caption         =   "Comuna: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5160
         TabIndex        =   39
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label9 
         Caption         =   "Dirección: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   360
         Width           =   1455
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Datos Personales"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   3255
      Left            =   120
      TabIndex        =   43
      Top             =   240
      Width           =   11535
      Begin VB.TextBox txt_dni 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   6960
         TabIndex        =   65
         Top             =   2760
         Width           =   4215
      End
      Begin VB.ComboBox cb_ext_ciudad 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   3000
         TabIndex        =   64
         Top             =   2760
         Width           =   3615
      End
      Begin VB.ComboBox cb_ext_pais 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   240
         TabIndex        =   63
         Top             =   2760
         Width           =   2535
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   3960
         TabIndex        =   62
         Top             =   600
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   661
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   52297729
         CurrentDate     =   41726
      End
      Begin VB.ComboBox cbxAgno 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   2040
         TabIndex        =   60
         Top             =   600
         Width           =   1575
      End
      Begin VB.ComboBox sexo 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2B2EC
         Left            =   6960
         List            =   "Form_NFicha_Alumno.frx":2B2F6
         Style           =   2  'Dropdown List
         TabIndex        =   17
         Top             =   2040
         Width           =   1935
      End
      Begin VB.CommandButton Command3 
         Caption         =   "&Buscar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   735
         Left            =   6000
         Picture         =   "Form_NFicha_Alumno.frx":2B30F
         Style           =   1  'Graphical
         TabIndex        =   52
         Top             =   240
         Visible         =   0   'False
         Width           =   1335
      End
      Begin VB.TextBox guion 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1560
         MaxLength       =   1
         TabIndex        =   11
         Top             =   600
         Width           =   255
      End
      Begin VB.ComboBox extran 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_NFicha_Alumno.frx":2B902
         Left            =   9360
         List            =   "Form_NFicha_Alumno.frx":2B90C
         Style           =   2  'Dropdown List
         TabIndex        =   18
         Top             =   2040
         Width           =   1815
      End
      Begin VB.TextBox edad 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   13322
            SubFormatType   =   1
         EndProperty
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3000
         TabIndex        =   16
         Top             =   2040
         Width           =   1095
      End
      Begin MSComCtl2.DTPicker fec_nac 
         Height          =   330
         Left            =   240
         TabIndex        =   15
         Top             =   2040
         Width           =   2535
         _ExtentX        =   4471
         _ExtentY        =   582
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         CustomFormat    =   "yyyyMMdd"
         Format          =   52297729
         UpDown          =   -1  'True
         CurrentDate     =   38960
         MinDate         =   31048
      End
      Begin VB.TextBox nombre 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6960
         TabIndex        =   14
         Top             =   1320
         Width           =   4215
      End
      Begin VB.TextBox ape_mat 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3720
         TabIndex        =   13
         Top             =   1320
         Width           =   2895
      End
      Begin VB.TextBox ape_pat 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   12
         Top             =   1320
         Width           =   2895
      End
      Begin VB.TextBox txtRut 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         MaxLength       =   8
         TabIndex        =   10
         Top             =   600
         Width           =   1215
      End
      Begin VB.Label Label29 
         Caption         =   "Pasaporte o DNI:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6960
         TabIndex        =   68
         Top             =   2520
         Width           =   2655
      End
      Begin VB.Label Label28 
         Caption         =   "Ciudad Origen:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3000
         TabIndex        =   67
         Top             =   2520
         Width           =   2895
      End
      Begin VB.Label Label27 
         Caption         =   "Pais Origen:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   66
         Top             =   2520
         Width           =   2295
      End
      Begin VB.Label Label26 
         Caption         =   "Fecha de Postulaciòn: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3960
         TabIndex        =   61
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label25 
         Caption         =   "Año al que Postula: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   2040
         TabIndex        =   59
         Top             =   360
         Width           =   2055
      End
      Begin VB.Label Label22 
         Alignment       =   1  'Right Justify
         Caption         =   "Recuerde que este es un proceso de inscripción, por lo que no tendrá acceso a alumnos ya matriculados en el año actual."
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   735
         Left            =   7200
         TabIndex        =   51
         Top             =   240
         Width           =   3975
      End
      Begin VB.Label Label12 
         Caption         =   "(Al 30 de Junio)"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4320
         TabIndex        =   40
         Top             =   2040
         Width           =   1215
      End
      Begin VB.Label Label8 
         Caption         =   "Extranjero: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   9360
         TabIndex        =   8
         Top             =   1800
         Width           =   1095
      End
      Begin VB.Label Label7 
         Caption         =   "Edad:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3000
         TabIndex        =   6
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "Sexo: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6960
         TabIndex        =   7
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "Fecha de Nacimiento: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1800
         Width           =   2055
      End
      Begin VB.Label Label4 
         Caption         =   "Nombres: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6960
         TabIndex        =   4
         Top             =   1080
         Width           =   1335
      End
      Begin VB.Label Label3 
         Caption         =   "Apellido Materno: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3720
         TabIndex        =   3
         Top             =   1080
         Width           =   1575
      End
      Begin VB.Label Label2 
         Caption         =   "Apellido Paterno: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   1080
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "RUN: *"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   0
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Label Label24 
      Caption         =   "*"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5640
      TabIndex        =   58
      Top             =   6840
      Width           =   375
   End
   Begin VB.Label Label23 
      Caption         =   "(*) Campos Obligatorios"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   12000
      TabIndex        =   57
      Top             =   6840
      Width           =   2055
   End
End
Attribute VB_Name = "Form_NFicha_Alumno"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private ed As Boolean
Private ci As String

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

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

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

Private Sub btnRechazar_Click()
        Form_NFicha_Rechazar.Show
End Sub




Private Sub cb_ext_pais_Click()
    Dim var_sql As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    
    pais_codigo = DevuelveCampo("paises", "", "codigo", "pais = '" & cb_ext_pais.Text & "'", conn)
    
    var_sql = "SELECT * FROM ciudades WHERE paises_codigo = '" & pais_codigo & "' ORDER BY ciudad"
    objRS.Open var_sql, conn
    cb_ext_ciudad.Clear
    While Not objRS.EOF
        cb_ext_ciudad.AddItem objRS("ciudad")
        objRS.MoveNext
    Wend
    objRS.Close
End Sub

Private Sub CboTipoF_Click()

If CboTipoF.ListIndex <> -1 Then
    fono_eme.Text = ""
    If Mid(CboTipoF.Text, 1, 1) = "F" Then
        LblTipoT.Caption = "+562"
    Else
        LblTipoT.Caption = "+569"
    End If

Else
    MsgBox "Debe Seleccionar Tipo de Teléfono", vbInformation, Me.Caption
    Exit Sub
End If
End Sub

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

Private Sub Command1_Click()
Dim grabaReg As ADODB.Command
Dim fono As String 'agregado 29-12-2021

If Me.sexo.Text = "MASCULINO" Then
    buscacombo 2, Me.cmb_embara  ' SI es hombre 1, pongo embarazo en 2 o sea NO
End If

If CboTipoF.ListIndex = -1 Then
    MsgBox "Debe ingresar Tipo de Teléfono Emergencia", vbCritical, "Datos Faltantes"
    Exit Sub
End If
If verifdato(Me.txtRut) = False Or verifdato(Me.nombre) = False Or verifdato(Me.ape_mat) = False Or verifdato(Me.ape_pat) = False _
Or verifdato(Me.direccion) = False Or verifdato(Me.fono) = False Or verifdato(Me.sexo) = False Or verifdato(Me.extran) = False _
Or verifdato(Me.cmbcomuna) = False Or verifdato(Me.emegencia) = False Or verifdato(Me.fono_eme) = False Or verifdato(cbxAgno) = False Then

    MsgBox "Faltan Datos", vbCritical, "Datos Faltantes"
Else
    
    ''''' Solo numeros de telefono
    If IsNumeric(Me.fono) = False Then
        MsgBox "El número telefonico no puede contener caracteres", vbInformation
        Me.fono.SetFocus
        Exit Sub
    End If
    
    If IsNumeric(Me.fono_eme) = False Then
        MsgBox "El número telefonico de emergencia no puede contener caracteres", vbInformation
        Me.fono_eme.SetFocus
        Exit Sub
    End If
    '''''
    
    ''''' Numeros largo
    If Len(Me.fono.Text) < 6 Then
        MsgBox "El número telefónico no puede tener menos de 6 caracteres", vbInformation
        Me.fono.SetFocus
        Exit Sub
    End If
    
    If Len(Me.fono_eme.Text) < 6 Then
        MsgBox "El número telefónico de emergencia no puede tener menos de 6 caracteres", vbInformation
        Me.fono_eme.SetFocus
        Exit Sub
        
    End If
    ''''' Fin Numeros largo
    
    If Me.email.Text = "" Then
        If MsgBox("¿Desea ingresar mail?", vbQuestion + vbYesNo) = vbYes Then
            Me.email.SetFocus
            Exit Sub
        End If
    Else
        If Validar_Email(Me.email.Text) = False Then
                MsgBox "El correo electrónico no es válido", vbInformation, "Datos Erroneos"
                Me.email.SetFocus
            Exit Sub
        End If
    End If
    
        If ed Then
        
        Dim dtmTest As Date
            dtmTest = DateValue(Now)

        'modificado 29-12-2021
        fono = LblTipoT.Caption & fono_eme.Text


        'MsgBox dtmTest
            sqlUp = "Update postulantes set " & _
                "nom_alu='" & Me.nombre.Text & "'" & ", ape_pat_alu='" & Me.ape_pat.Text & "'" & _
                ", ape_mat_alu='" & Me.ape_mat.Text & "'" & ", fec_nacalu='" & Format(Me.fec_nac.Value, "YYYYMMDD") & "'" & _
                ", sex_alu=" & Me.sexo.ItemData(Me.sexo.ListIndex) & ", ind_ext_alu=" & Me.extran.ItemData(Me.extran.ListIndex) & _
                ", dire_alu='" & Me.direccion.Text & "'" & _
                ", fon_alu='" & Me.fono.Text & "'" & ", email_alu='" & Me.email.Text & "'" & _
                ", col_procedencia_alu='" & Me.clprocede.Text & "'" & _
                ", enfermedades_alu='" & Me.enfermedades.Text & "'" & _
                ", tratamiento_Alu='" & Me.tratamiento.Text & "'" & _
                ", alergico_a_alu='" & Me.alergias.Text & "'" & _
                ", contacto_emergencia_alu='" & Me.emegencia.Text & "'" & _
                ", fon_emergencia_alu='" & fono & "'" & _
                ", cod_geo='" & RetornaCampo("codigos__geograficos", "cod_geo", "comuna='" & Me.cmbcomuna.List(Me.cmbcomuna.ListIndex) & "'", conn) & "'" & _
                ", VI_Sol_Car_Esc=" & Me.cmb_alucar.ItemData(Me.cmb_alucar.ListIndex) & _
                ", indigena='" & Me.cmb_indi.ItemData(Me.cmb_indi.ListIndex) & "'" & _
                ", VI_FOR_EXI_REL=" & Me.cmb_eximreg.ItemData(Me.cmb_eximreg.ListIndex) & _
                ", agno_postulacion='" & Me.cbxAgno & "'" & _
                ", VII_FEC_INS='" & Format(Me.DTPicker1.Value, "YYYY-MM-DD") & "'" & _
                ", ind_embarazo='" & Me.cmb_embara.ItemData(Me.cmb_embara.ListIndex) & "'" & _
                ", dni='" & txt_dni.Text & "'" & _
                ", ciudad_ext='" & DevuelveCampo("ciudades", "", "idciudades", "ciudad = '" & cb_ext_ciudad.Text & "'", conn) & "'" & _
                ", pais_ext='" & DevuelveCampo("paises", "", "codigo", "pais = '" & cb_ext_pais.Text & "'", conn) & "'" & _
                "WHERE ci_alu='" & ci & "' and ci_alu not in (Select ci_alu from matriculas where ci_alu='" & ci & "' and anno_mat = " & Anno & " and activo_alu='SI' and date_format(fec_retiro,'%Y%m%d')='11111111')"
                
                Set grabaReg = New ADODB.Command
                grabaReg.ActiveConnection = conn
                grabaReg.CommandText = sqlUp
                grabaReg.Execute
                
                Set grabaReg = New ADODB.Command
                grabaReg.ActiveConnection = conn
                
                grabaReg.CommandText = "Insert into log_ins_nuevo set fecha=CURRENT_TIMESTAMP , quien = '" & Nom_usu_ses & "', log_accion ='Se actualizaron los datos de " & ci & " para su postulación'"
                grabaReg.Execute
                
                Form_NFicha_Inscripcion.ALU_RUN.Text = ci
                Form_NFicha_Inscripcion.cl_nombre.Text = Me.ape_pat.Text & " " & Me.ape_mat.Text & " " & Me.nombre.Text
                Unload Me
        Else
            'MODIFICADO 30-12-2021
            fono = LblTipoT.Caption & fono_eme.Text
            
            sqlUp = "INSERT INTO postulantes set " & _
                "ci_alu='" & ci & "'" & ",nom_alu='" & Me.nombre.Text & "'" & ", ape_pat_alu='" & Me.ape_pat.Text & "'" & _
                ", ape_mat_alu='" & Me.ape_mat.Text & "'" & ", fec_nacalu='" & Format(Me.fec_nac.Value, "YYYYMMDD") & "'" & _
                ", sex_alu=" & Me.sexo.ItemData(Me.sexo.ListIndex) & ", ind_ext_alu=" & Me.extran.ItemData(Me.extran.ListIndex) & _
                ", dire_alu='" & Me.direccion.Text & "'" & _
                ", fon_alu='" & Me.fono.Text & "'" & ", email_alu='" & Me.email.Text & "'" & _
                ", col_procedencia_alu='" & Me.clprocede.Text & "'" & _
                ", enfermedades_alu='" & Me.enfermedades.Text & "'" & _
                ", tratamiento_Alu='" & Me.tratamiento.Text & "'" & _
                ", alergico_a_alu='" & Me.alergias.Text & "'" & _
                ", contacto_emergencia_alu='" & Me.emegencia.Text & "'" & _
                ", fon_emergencia_alu='" & fono & "'" & _
                ", cod_geo='" & RetornaCampo("codigos__geograficos", "cod_geo", "comuna='" & Me.cmbcomuna.List(Me.cmbcomuna.ListIndex) & "'", conn) & "'" & _
                ", VI_Sol_Car_Esc=" & Me.cmb_alucar.ItemData(Me.cmb_alucar.ListIndex) & _
                ", indigena='" & Me.cmb_indi.ItemData(Me.cmb_indi.ListIndex) & "'" & _
                ", VI_FOR_EXI_REL=" & Me.cmb_eximreg.ItemData(Me.cmb_eximreg.ListIndex) & _
                ", agno_postulacion='" & Me.cbxAgno.Text & "' " & _
                ", VII_FEC_INS='" & Format(Me.DTPicker1.Value, "YYYY-MM-DD") & "'" & _
                ", dni='" & txt_dni.Text & "'" & _
                ", ciudad_ext='" & DevuelveCampo("ciudades", "", "idciudades", "ciudad = '" & cb_ext_ciudad.Text & "'", conn) & "'" & _
                ", pais_ext='" & DevuelveCampo("paises", "", "codigo", "pais = '" & cb_ext_pais.Text & "'", conn) & "'"
                                
                                
                Set grabaReg = New ADODB.Command
                grabaReg.ActiveConnection = conn
                grabaReg.CommandText = sqlUp
                grabaReg.Execute
                
                grabaReg.CommandText = "Insert into log_ins_nuevo set fecha=CURRENT_TIMESTAMP , quien = '" & Nom_usu_ses & "', log_accion ='Se ingreso un nuevo inscrito " & ci & " para su postulación'"
                grabaReg.Execute
                
                Form_NFicha_Inscripcion.ALU_RUN.Text = ci
                Form_NFicha_Inscripcion.cl_nombre.Text = Me.ape_pat.Text & " " & Me.ape_mat.Text & " " & Me.nombre.Text
                Unload Me
        End If
    End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Command3_Click()
Dim regBuscar As ADODB.Recordset
Dim var_sql As String
Dim objRS As ADODB.Recordset
Set objRS = New ADODB.Recordset

ci = ""
ed = False
ci = Trim(Me.txtRut.Text) & "-" & Trim(Me.guion)


Set regBuscar = New ADODB.Recordset

sqlbuscar = "Select ci_alu from matriculas where ci_alu='" & ci & "' and anno_mat = " & Anno & " and activo_alu='SI' and date_format(fec_retiro,'%Y%m%d')='11111111'"

regBuscar.Open sqlbuscar, conn


If regBuscar.RecordCount > 0 Then
    MsgBox "El alumno ya se encuentra en el sistema. Para modificar sus datos dirijase a Ficha de Alumno", vbCritical, "El alumno ya está ingresado en el sistema."
    Me.txtRut.Text = ""
    Me.guion.Text = ""
    regBuscar.Close
    Exit Sub
Else
    regBuscar.Close
    regBuscar.Open "Select * from postulantes where ci_alu='" & ci & "'"
    If regBuscar.RecordCount > 0 Then
        ed = True
        Me.nombre.Text = regBuscar!Nom_Alu
        Me.ape_pat.Text = regBuscar!ape_pat_alu
        Me.ape_mat.Text = regBuscar!ape_mat_alu
        Me.fec_nac.Value = regBuscar!fec_nacalu
        If regBuscar!sex_alu = 1 Then
           Me.sexo.ListIndex = 0
        ElseIf regBuscar!sex_alu = 2 Then
            Me.sexo.ListIndex = 1
        End If
            
        If regBuscar!ind_ext_alu = 2 Then
            Me.extran.ListIndex = 0
        Else
            Me.extran.ListIndex = 1
            
        End If
        
        var_sql = "SELECT * FROM ciudades WHERE paises_codigo = '" & regBuscar!pais_ext & "' ORDER BY ciudad"
        objRS.Open var_sql, conn
        cb_ext_ciudad.Clear
        While Not objRS.EOF
            cb_ext_ciudad.AddItem objRS("ciudad")
            objRS.MoveNext
        Wend
        objRS.Close
                
        
        'Me.cb_ext_pais.Text = regBuscar!pais_ext
        Me.cb_ext_pais.Text = DevuelveCampo("paises", "", "pais", "codigo = '" & regBuscar!pais_ext & "'", conn)
       ' Me.cb_ext_ciudad.Text = regBuscar!ciudad_ext
        Me.cb_ext_ciudad.Text = DevuelveCampo("ciudades", "", "ciudad", "idciudades = '" & regBuscar!ciudad_ext & "'", conn)
        '
        
        Me.txt_dni.Text = regBuscar!dni
        Me.direccion.Text = regBuscar!dire_alu
        Me.fono = regBuscar!fon_alu
        Me.email = IIf((Not IsNull(regBuscar!email_alu)), regBuscar!email_alu, "")
        Me.clprocede.Text = regBuscar!col_procedencia_alu
        Me.enfermedades.Text = regBuscar!enfermedades_alu
        Me.tratamiento.Text = regBuscar!tratamiento_Alu
        Me.alergias.Text = regBuscar!alergico_a_alu
        Me.emegencia.Text = regBuscar!contacto_emergencia_alu
        'se modifica 29-12-2021
        
        If Mid(regBuscar!fon_emergencia_alu, 1, 4) = "+569" Or Mid(regBuscar!fon_emergencia_alu, 1, 4) = "+562" Then
            Me.LblTipoT.Caption = Mid(regBuscar!fon_emergencia_alu, 1, 4)
            If Me.LblTipoT.Caption = "+569" Then
                CboTipoF.ListIndex = 1
            Else
                CboTipoF.ListIndex = 0
            End If
            Me.fono_eme.Text = Mid(regBuscar!fon_emergencia_alu, 5, 8)
        Else
        
            If Len(regBuscar!fon_emergencia_alu) > 8 Then
                Me.fono_eme.Text = Mid(regBuscar!fon_emergencia_alu, Len(regBuscar!fon_emergencia_alu) - 7)
            Else
        
                Me.fono_eme.Text = regBuscar!fon_emergencia_alu
            End If
        
            
        End If
        
        
'        LblTipoT.Caption = Mid(regBuscar!fon_emergencia_alu, 1, 4)
'        'Me.fono_eme.Text = regBuscar!fon_emergencia_alu
'        Me.fono_eme.Text = Mid(regBuscar!fon_emergencia_alu, 5, 8)
'
'        If Me.LblTipoT.Caption = "+569" Then
'            CboTipoF.ListIndex = 1
'        Else
'            CboTipoF.ListIndex = 0
'        End If

        Me.cbxAgno = IIf(IsNull(regBuscar!agno_postulacion), "", regBuscar!agno_postulacion)
        BuscaComboBD RetornaCampo("codigos__geograficos", "comuna", "cod_geo='" & regBuscar!cod_geo & "'", conn), Me.cmbcomuna
        buscacombo regBuscar!VI_Sol_Car_Esc, Me.cmb_alucar
        buscacombo regBuscar!VI_FOR_EXI_REL, Me.cmb_eximreg
        buscacombo regBuscar!indigena, Me.cmb_indi
        buscacombo regBuscar!ind_embarazo, Me.cmb_embara
        
        If Me.sexo.Text = "MASCULINO" Then
            buscacombo 2, Me.cmb_embara  ' SI es hombre 1, pongo embarazo en 2 o sea NO
        End If
        Call fec_nac_Change
    Else
        ed = False
    End If
End If

End Sub

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


Private Sub edad_GotFocus()
AgnoCal = str(Anno) + "0631"
FechaNa = Format(Me.fec_nac.Value, "YYYYMMDD")
annos = Int((val(AgnoCal) - val(FechaNa)) / 10000)
Me.edad.Text = annos
End Sub

Private Sub edad_LostFocus()
AgnoCal = str(Anno) + "0631"
FechaNa = Format(Me.fec_nac.Value, "YYYYMMDD")
annos = Int((val(AgnoCal) - val(FechaNa)) / 10000)
Me.edad.Text = annos
End Sub



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

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



Private Sub fec_nac_Change()
AgnoCal = str(Anno) + "0631"
FechaNas = Format(Me.fec_nac.Value, "YYYYMMDD")
annos = Int((val(AgnoCal) - val(FechaNas)) / 10000)
End Sub



Private Sub Form_Load()
Dim var_sql As String
Dim objRS As ADODB.Recordset
Set objRS = New ADODB.Recordset

For I = 2021 To Year(Date) + 1
Me.cbxAgno.AddItem I
Next I
'Me.cbxAgno.ListIndex = 0

Me.DTPicker1.Value = Date
Me.DTPicker1.Enabled = False

Me.region.Text = "SANTIAGO"

llenarcombo Me.cmbcomuna, "Select cod_geo as ind, comuna as lab from codigos__geograficos"
Me.extran.ListIndex = 0
If Len(Form_NFicha_Inscripcion.ci_aluaca) > 9 Then
    Me.txtRut.Text = Mid(Form_NFicha_Inscripcion.ci_aluaca, 1, 8)
    Me.guion.Text = Mid(Form_NFicha_Inscripcion.ci_aluaca, 10, 1)
    Me.txtRut.Enabled = False
    Me.guion.Enabled = False
    Command3_Click
End If

    cmb_alucar.ListIndex = 1
    cmb_eximreg.ListIndex = 0
    cmb_indi.ListIndex = 0
    cmb_embara.ListIndex = 0

var_sql = "SELECT * FROM paises order by pais"
objRS.Open var_sql, conn
While Not objRS.EOF
    cb_ext_pais.AddItem objRS("pais")
    objRS.MoveNext
Wend
objRS.Close
End Sub

Private Sub guion_KeyPress(KeyAscii As Integer)
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
    If (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 guion_LostFocus()
If guion.Text = digito(Me.txtRut.Text) Then
Command3_Click
Else
MsgBox "El dígito verificador no es válido.", vbOKOnly, "Atención"
txtRut.SetFocus
End If
End Sub


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


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

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

Private Sub txtRut_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
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(txtRut.Text) And Len(Trim(txtRut.Text)) > 6 Then
    txtRut.Text = Format(txtRut.Text, "00000000")
    guion.Enabled = True
        
ElseIf Len(Trim(txtRut.Text)) >= 1 And Len(Trim(txtRut.Text)) <= 6 Then
  MsgBox "El RUT ingresado no es válido.", vbOKOnly, "Atención"
    guion.Text = ""
    txtRut.Text = ""
    txtRut.SetFocus
End If
End If
KeyAscii = 0
End Sub

Private Sub txtRut_LostFocus()
    If guion.Text <> "" Then
        If guion.Text = digito(Me.txtRut.Text) Then
            MsgBox "El RUT ingresado no es válido.", vbOKOnly, "Atención"
            guion.Text = ""
            txtRut.Text = ""
            txtRut.SetFocus
        End If
    Else

    End If
    guion.SetFocus
End Sub

Private Sub llenarcombo(objeto As ComboBox, sqlstring As String)

    Dim Registros As ADODB.Recordset
    Set Registros = New ADODB.Recordset
    Dim id As Integer
    
    Registros.Open sqlstring, conn
    c = 0
    While Not Registros.EOF
        id = val(Registros!Ind)
        objeto.AddItem Registros!lab
        objeto.ItemData(c) = id
        c = c + 1
        Registros.MoveNext
    Wend
    Registros.Close
End Sub
Function verifdato(objeto As Object) As Boolean
verifdato = True
If Trim(objeto.Text) = "" Then
    objeto.SetFocus
    verifdato = False
End If

End Function

Private Sub buscacombo(clx As Variant, nox As ComboBox)
If IsNull(clx) Then
    nox.ListIndex = 0
    Exit Sub
End If
For I = 0 To nox.ListCount - 1
    If nox.ItemData(I) = clx Then
        nox.ListIndex = I
        Exit Sub
    End If
Next
nox.ListIndex = 0
End Sub

Private Sub BuscaComboBD(clx As Variant, nox As ComboBox)
If IsNull(clx) Then
    nox.ListIndex = 0
    Exit Sub
End If
For I = 0 To nox.ListCount - 1
    If nox.List(I) = clx Then
        nox.ListIndex = I
        Exit Sub
    End If
Next
nox.ListIndex = 0
End Sub


'
''Función que comprueba si una diección de email es válida
''*********************************************************************************
'Public Function Validar_Email(ByVal email As String) As Boolean
'
'    Dim i As Integer, ILen As Integer, caracter As String
'    Dim Pos As Integer, bp As Boolean, iPos As Integer, iPos2 As Integer
'
'    On Local Error GoTo Err_Sub
'
'    email = Trim$(email)
'
'    If email = vbNullString Then
'        Exit Function
'    End If
'
'    email = LCase$(email)
'    ILen = Len(email)
'
'
'    For i = 1 To ILen
'        caracter = Mid(email, i, 1)
'
'        If (Not (caracter Like "[a-z]")) And (Not (caracter Like "[0-9]")) Then
'
'            If InStr(1, "_-" & "." & "@", caracter) > 0 Then
'                If bp = True Then
'                   Exit Function
'                Else
'                    bp = True
'
'                    If i = 1 Or i = ILen Then
'                        Exit Function
'                    End If
'
'                    If caracter = "@" Then
'                        If iPos = 0 Then
'                            iPos = i
'                        Else
'
'                            Exit Function
'                        End If
'                    End If
'                    If caracter = "." Then
'                        iPos2 = i
'                    End If
'
'                End If
'            Else
'
'                Exit Function
'            End If
'        Else
'            bp = False
'        End If
'    Next i
'    If iPos = 0 Or iPos2 = 0 Then
'        Exit Function
'    End If
'
'    If iPos2 < iPos Then
'        Exit Function
'    End If
'
'
'    Validar_Email = True
'
'    Exit Function
'Err_Sub:
'    On Local Error Resume Next
'
'    Validar_Email = False
'End Function
'
