VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form_Ficha_Alu_Datos 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Formulario de Edicion Alumno"
   ClientHeight    =   7725
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   12465
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   7725
   ScaleWidth      =   12465
   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          =   3015
      Left            =   120
      TabIndex        =   35
      Top             =   120
      Width           =   9855
      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          =   285
         Left            =   5760
         TabIndex        =   67
         Top             =   2520
         Width           =   3855
      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             =   2520
         Width           =   2655
      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             =   2520
         Width           =   2655
      End
      Begin VB.TextBox txtRut 
         Height          =   285
         Left            =   240
         MaxLength       =   9
         TabIndex        =   45
         Top             =   600
         Width           =   1215
      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        =   44
         Top             =   1200
         Width           =   2655
      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            =   3000
         TabIndex        =   43
         Top             =   1200
         Width           =   2655
      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            =   5760
         TabIndex        =   42
         Top             =   1200
         Width           =   3855
      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        =   40
         Top             =   1800
         Width           =   735
      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_Ficha_Alu_Datos.frx":0000
         Left            =   7440
         List            =   "Form_Ficha_Alu_Datos.frx":000A
         Style           =   2  'Dropdown List
         TabIndex        =   39
         Top             =   1800
         Width           =   2175
      End
      Begin VB.TextBox guion 
         Height          =   285
         Left            =   1560
         MaxLength       =   1
         TabIndex        =   38
         Top             =   600
         Width           =   375
      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            =   2040
         Picture         =   "Form_Ficha_Alu_Datos.frx":0016
         Style           =   1  'Graphical
         TabIndex        =   37
         Top             =   240
         Visible         =   0   'False
         Width           =   855
      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_Ficha_Alu_Datos.frx":058C
         Left            =   5760
         List            =   "Form_Ficha_Alu_Datos.frx":0596
         Style           =   2  'Dropdown List
         TabIndex        =   36
         Top             =   1800
         Width           =   1455
      End
      Begin MSComCtl2.DTPicker fec_nac 
         Height          =   375
         Left            =   240
         TabIndex        =   41
         Top             =   1800
         Width           =   2655
         _ExtentX        =   4683
         _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
         CustomFormat    =   "yyyyMMdd"
         Format          =   52035585
         UpDown          =   -1  'True
         CurrentDate     =   38960
         MinDate         =   31048
      End
      Begin VB.Label Label28 
         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            =   5760
         TabIndex        =   68
         Top             =   2280
         Width           =   3615
      End
      Begin VB.Label Label27 
         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          =   255
         Left            =   3000
         TabIndex        =   66
         Top             =   2280
         Width           =   1815
      End
      Begin VB.Label Label22 
         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          =   255
         Left            =   240
         TabIndex        =   65
         Top             =   2280
         Width           =   1335
      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        =   54
         Top             =   360
         Width           =   735
      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        =   53
         Top             =   960
         Width           =   1935
      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            =   3000
         TabIndex        =   52
         Top             =   960
         Width           =   1935
      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            =   5760
         TabIndex        =   51
         Top             =   960
         Width           =   1335
      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        =   50
         Top             =   1560
         Width           =   2055
      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            =   5760
         TabIndex        =   49
         Top             =   1560
         Width           =   1455
      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        =   48
         Top             =   1560
         Width           =   735
      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            =   7440
         TabIndex        =   47
         Top             =   1560
         Width           =   1215
      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            =   3840
         TabIndex        =   46
         Top             =   1800
         Width           =   1335
      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        =   22
      Top             =   3240
      Width           =   9855
      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        =   28
         Top             =   600
         Width           =   4815
      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            =   7560
         TabIndex        =   27
         Top             =   600
         Width           =   2055
      End
      Begin VB.TextBox fono 
         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        =   26
         Top             =   1200
         Width           =   2055
      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            =   5280
         TabIndex        =   25
         Top             =   1200
         Width           =   4335
      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        =   24
         Top             =   1200
         Width           =   2535
      End
      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_Ficha_Alu_Datos.frx":05AF
         Left            =   5280
         List            =   "Form_Ficha_Alu_Datos.frx":05B1
         Sorted          =   -1  'True
         Style           =   2  'Dropdown List
         TabIndex        =   23
         Top             =   600
         Width           =   1815
      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        =   34
         Top             =   360
         Width           =   1935
      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            =   5280
         TabIndex        =   33
         Top             =   360
         Width           =   1815
      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            =   7560
         TabIndex        =   32
         Top             =   360
         Width           =   1335
      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        =   31
         Top             =   960
         Width           =   1215
      End
      Begin VB.Label Label14 
         Caption         =   "Colegio de cual procede:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5280
         TabIndex        =   30
         Top             =   960
         Width           =   3975
      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        =   29
         Top             =   960
         Width           =   1695
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "Enfermedades, Tratamientos y Emergencia"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   2295
      Left            =   120
      TabIndex        =   11
      Top             =   5280
      Width           =   9855
      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_Ficha_Alu_Datos.frx":05B3
         Left            =   6195
         List            =   "Form_Ficha_Alu_Datos.frx":05BD
         TabIndex        =   69
         Top             =   1785
         Width           =   855
      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        =   16
         Top             =   600
         Width           =   9375
      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        =   15
         Top             =   1200
         Width           =   4815
      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        =   14
         Top             =   1200
         Width           =   4455
      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        =   13
         Top             =   1800
         Width           =   4815
      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            =   7680
         MaxLength       =   8
         TabIndex        =   12
         Top             =   1800
         Width           =   1935
      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            =   5160
         TabIndex        =   71
         Top             =   1590
         Width           =   975
      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            =   7155
         TabIndex        =   70
         Top             =   1800
         Width           =   480
      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        =   21
         Top             =   360
         Width           =   3615
      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        =   20
         Top             =   960
         Width           =   2655
      End
      Begin VB.Label Label18 
         Caption         =   "Especificar alergias si 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        =   19
         Top             =   960
         Width           =   2655
      End
      Begin VB.Label Label19 
         Caption         =   "En caso de emergencia:"
         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        =   18
         Top             =   1560
         Width           =   2775
      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          =   210
         Left            =   7680
         TabIndex        =   17
         Top             =   1560
         Width           =   405
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Grabar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   10440
      TabIndex        =   10
      Top             =   5760
      Width           =   1455
   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          =   495
      Left            =   10440
      TabIndex        =   9
      Top             =   6360
      Width           =   1455
   End
   Begin VB.Frame Frame4 
      Caption         =   "Otros Antecedentes"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   5055
      Left            =   10080
      TabIndex        =   0
      Top             =   120
      Width           =   2175
      Begin VB.ComboBox cb_solidario 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   480
         TabIndex        =   62
         Text            =   "Combo1"
         Top             =   2520
         Width           =   1095
      End
      Begin VB.ComboBox cb_integrado 
         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_Ficha_Alu_Datos.frx":05CE
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":05D8
         Style           =   2  'Dropdown List
         TabIndex        =   57
         Top             =   3120
         Width           =   1095
      End
      Begin VB.ComboBox cb_junaeb 
         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_Ficha_Alu_Datos.frx":05E4
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":05EE
         Style           =   2  'Dropdown List
         TabIndex        =   56
         Top             =   3720
         Width           =   1095
      End
      Begin VB.ComboBox cb_diferencial 
         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_Ficha_Alu_Datos.frx":05FA
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":0604
         Style           =   2  'Dropdown List
         TabIndex        =   55
         Top             =   4320
         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_Ficha_Alu_Datos.frx":0610
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":061B
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   480
         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_Ficha_Alu_Datos.frx":0627
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":0632
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   1320
         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_Ficha_Alu_Datos.frx":063E
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":0648
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   1920
         Width           =   1095
      End
      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_Ficha_Alu_Datos.frx":0654
         Left            =   480
         List            =   "Form_Ficha_Alu_Datos.frx":065E
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   2520
         Visible         =   0   'False
         Width           =   1095
      End
      Begin VB.Label Label23 
         Alignment       =   2  'Center
         Caption         =   "Chile Solidario"
         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        =   61
         Top             =   2280
         Width           =   1815
      End
      Begin VB.Label Label24 
         Alignment       =   2  'Center
         Caption         =   "Alumno Integrado"
         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        =   60
         Top             =   2880
         Width           =   1815
      End
      Begin VB.Label Label25 
         Alignment       =   2  'Center
         Caption         =   "JUNAEB"
         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        =   59
         Top             =   3480
         Width           =   1815
      End
      Begin VB.Label Label26 
         Alignment       =   2  'Center
         Caption         =   "Grupo Diferencial"
         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        =   58
         Top             =   4080
         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        =   8
         Top             =   1680
         Width           =   1695
      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        =   7
         Top             =   2280
         Visible         =   0   'False
         Width           =   1815
      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        =   6
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Llbl_com_ant 
         Alignment       =   2  'Center
         Caption         =   " Formulario de 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          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   840
         Width           =   1935
      End
   End
End
Attribute VB_Name = "Form_Ficha_Alu_Datos"
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 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

If CodPerfil = "#PJE#" Then
    MsgBox "Su perfil no tiene la autorización para modificar datos", vbInformation
    Exit Sub
End If

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

'se modifica 04-01-2022
If Me.email.Text <> "" Then
    If Not Validar_Email(Me.email.Text) Then
    
        MsgBox "Debe ingresar dirección de correo electrónico valida", vbInformation
        Me.email.Text = ""
        Exit Sub
    End If
End If
If Me.fono.Text <> "" Then
    If IsNumeric(Me.fono.Text) = False Then
        MsgBox "Teléfono Alumno no puede contener caracteres", vbInformation
        Me.fono.SetFocus
        Exit Sub
    End If
End If

If fono_eme.Text <> "" Then
    If IsNumeric(fono_eme.Text) = False Then
        MsgBox "Teléfono de emergencia no puede contener caracteres", vbInformation
        fono_eme.SetFocus
        Exit Sub
    End If
End If


If verifdato(Me.txtRut) And verifdato(Me.nombre) And verifdato(Me.ape_mat) And verifdato(Me.ape_pat) And verifdato(Me.direccion) And verifdato(Me.fono) And verifdato(Me.sexo) And verifdato(Me.extran) And verifdato(Me.cmbcomuna) And verifdato(Me.emegencia) And verifdato(Me.fono_eme) Then
    If ed Then
        sqlUp = "Update postulantes set " & _
                "nom_alu='" & Me.nombre.Text & "'" & ", ape_pat_alu='" & Me.ape_pat.Text & "'" & _
                ", diferencial='" & Me.cb_diferencial.Text & "'" & ", solidario='" & Me.cb_solidario.Text & "'" & _
                ", integrado='" & Me.cb_integrado.Text & "'" & ", junaeb='" & Me.cb_junaeb.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='" & Me.LblTipoT.Caption & Me.fono_eme.Text & "'" & _
                ", 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) & _
                ", 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 & "'"
                
                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_Ficha_Alu.ALU_RUN.Text = ci
                Form_Ficha_Alu.cl_nombre.Text = Me.ape_pat.Text & " " & Me.ape_mat.Text & " " & Me.nombre.Text
                Unload Me
     Else
         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='" & Me.LblTipoT.Caption & Me.fono_eme.Text & "'" & _
                ", 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) & _
                ", 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) & "'"
                
                
                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_Ficha_Alu.ALU_RUN.Text = ci
                Form_Ficha_Alu.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 var_sql As String
Dim objRS As ADODB.Recordset
Set objRS = New ADODB.Recordset

Dim regBuscar As 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 activo_alu='SI' and date_format(fec_retiro,'%Y%m%d')='11111111' Order By anno_mat DESC"

regBuscar.Open sqlbuscar, conn


If regBuscar.RecordCount < 1 Then
    MsgBox "Usted NO puede editar a un inscrito, solo Alumnos actuales", vbCritical, "Alumno No es Regular"
    Me.txtRut.Text = ""
    Me.guion.Text = ""
    regBuscar.Close
    Unload Me
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
        
        Me.cb_diferencial = regBuscar!diferencial
        Me.cb_integrado = regBuscar!integrado
        Me.cb_junaeb = regBuscar!junaeb
        Me.cb_solidario.Text = regBuscar!solidario
        
        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 = 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
        'se modifica 03/01/2022
        Me.emegencia.Text = regBuscar!contacto_emergencia_alu
        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
        
        
            'Me.fono_eme.Text = regBuscar!fon_emergencia_alu
        End If
        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
        
    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) + "0630"
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) + "0630"
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) + "0630"
FechaNa = Format(Me.fec_nac.Value, "YYYYMMDD")
annos = Int((val(AgnoCal) - val(FechaNa)) / 10000)
Me.edad.Text = annos
End Sub

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

llenarcombo Me.cmbcomuna, "Select cod_geo as ind, comuna as lab from codigos__geograficos"
Me.extran.ListIndex = 0
cb_diferencial.Clear
cb_integrado.Clear
cb_junaeb.Clear
cb_solidario.Clear
cb_diferencial.AddItem "SI"
cb_diferencial.AddItem "NO"
cb_integrado.AddItem "SI"
cb_integrado.AddItem "NO"
cb_junaeb.AddItem "SI"
cb_junaeb.AddItem "NO"
cb_solidario.AddItem "SI"
cb_solidario.AddItem "NO"

If Len(Form_Ficha_Alu.ci_aluaca) > 9 Then
    Me.txtRut.Text = Mid(Form_Ficha_Alu.ci_aluaca, 1, IIf(Len(Form_Ficha_Alu.ci_aluaca) = 11, 9, 8))
    Me.guion.Text = Mid(Form_Ficha_Alu.ci_aluaca, IIf(Len(Form_Ficha_Alu.ci_aluaca) = 10, 10, 11), 1)
    Me.txtRut.Enabled = False
    Me.guion.Enabled = False
    Command3_Click
End If

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 Form_Unload(Cancel As Integer)
    Form_Ficha_Alu.Command1_Click
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 "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        guion.Text = ""
        txtRut.Text = ""
        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)
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 "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
    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
        
    Else
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        txtRut.SetFocus
    End If
Else
    guion.SetFocus
End If
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
    MsgBox "Faltan Datos", vbCritical, "Datos Faltantes"
    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
'

