VERSION 5.00
Begin VB.Form Form_NFicha_Apoderado 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Asignación o Ingreso de Apoderado"
   ClientHeight    =   8220
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10035
   Icon            =   "Form_NFicha_Apoderado.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   8220
   ScaleWidth      =   10035
   Begin VB.CommandButton Command3 
      Caption         =   "&Cancelar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   5160
      Picture         =   "Form_NFicha_Apoderado.frx":2A8B2
      Style           =   1  'Graphical
      TabIndex        =   40
      Top             =   7200
      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          =   855
      Left            =   3600
      Picture         =   "Form_NFicha_Apoderado.frx":2AC1A
      Style           =   1  'Graphical
      TabIndex        =   39
      Top             =   7200
      Width           =   1455
   End
   Begin VB.Frame Frame2 
      Caption         =   "Parentesco"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1215
      Left            =   120
      TabIndex        =   31
      Top             =   5880
      Width           =   9735
      Begin VB.ComboBox cmb_apocon 
         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_Apoderado.frx":2B273
         Left            =   6480
         List            =   "Form_NFicha_Apoderado.frx":2B275
         Style           =   2  'Dropdown List
         TabIndex        =   38
         TabStop         =   0   'False
         Top             =   600
         Visible         =   0   'False
         Width           =   3015
      End
      Begin VB.ComboBox cmb_apoparen 
         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_Apoderado.frx":2B277
         Left            =   240
         List            =   "Form_NFicha_Apoderado.frx":2B279
         Style           =   2  'Dropdown List
         TabIndex        =   34
         TabStop         =   0   'False
         Top             =   600
         Width           =   2895
      End
      Begin VB.ComboBox cmb_apotipo 
         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_Apoderado.frx":2B27B
         Left            =   3360
         List            =   "Form_NFicha_Apoderado.frx":2B27D
         Style           =   2  'Dropdown List
         TabIndex        =   33
         TabStop         =   0   'False
         Top             =   600
         Width           =   2895
      End
      Begin VB.Label Label9 
         BackStyle       =   0  'Transparent
         Caption         =   "Convenio:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6600
         TabIndex        =   37
         Top             =   360
         Visible         =   0   'False
         Width           =   1935
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "Tipo Apoderado:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3360
         TabIndex        =   36
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "Apoderado:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   35
         Top             =   360
         Width           =   2655
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "&Madre"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Index           =   0
      Left            =   6840
      Picture         =   "Form_NFicha_Apoderado.frx":2B27F
      Style           =   1  'Graphical
      TabIndex        =   30
      Top             =   1320
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "Apoderado"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   4575
      Left            =   120
      TabIndex        =   16
      Top             =   1200
      Width           =   9735
      Begin VB.TextBox txt_telefono_adicional_2 
         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            =   2520
         MaxLength       =   12
         TabIndex        =   47
         Top             =   3360
         Width           =   2175
      End
      Begin VB.TextBox txt_telefono_adicional_1 
         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        =   46
         Top             =   3360
         Width           =   2175
      End
      Begin VB.TextBox cel_apo 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3240
         MaxLength       =   9
         TabIndex        =   9
         Top             =   2640
         Width           =   1455
      End
      Begin VB.TextBox fonotra_apo 
         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            =   4800
         MaxLength       =   12
         TabIndex        =   10
         Top             =   2640
         Width           =   2175
      End
      Begin VB.TextBox fono_apo 
         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       =   10
         TabIndex        =   8
         Top             =   2640
         Width           =   2175
      End
      Begin VB.TextBox email_apo 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   7080
         MaxLength       =   40
         TabIndex        =   11
         Top             =   2640
         Width           =   2415
      End
      Begin VB.CommandButton Command2 
         Caption         =   "&Padre"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   735
         Index           =   1
         Left            =   8160
         Picture         =   "Form_NFicha_Apoderado.frx":2B82C
         Style           =   1  'Graphical
         TabIndex        =   32
         Top             =   120
         Width           =   1335
      End
      Begin VB.TextBox ci_apo 
         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        =   1
         Top             =   600
         Width           =   1215
      End
      Begin VB.TextBox apepat_apo 
         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       =   20
         TabIndex        =   3
         Top             =   1320
         Width           =   2535
      End
      Begin VB.TextBox apemat_apo 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2880
         MaxLength       =   20
         TabIndex        =   4
         Top             =   1320
         Width           =   3015
      End
      Begin VB.TextBox nom_apo 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6000
         MaxLength       =   30
         TabIndex        =   5
         Top             =   1320
         Width           =   3495
      End
      Begin VB.TextBox dig_apo 
         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        =   2
         Top             =   600
         Width           =   255
      End
      Begin VB.TextBox dir_apo 
         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       =   100
         TabIndex        =   6
         Top             =   2040
         Width           =   5655
      End
      Begin VB.TextBox empresa_apo 
         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       =   25
         TabIndex        =   12
         Top             =   4080
         Width           =   5655
      End
      Begin VB.TextBox ocu_apo 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   4800
         MaxLength       =   25
         TabIndex        =   13
         Top             =   3360
         Width           =   4695
      End
      Begin VB.ComboBox cmbcomuna_apo 
         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_Apoderado.frx":2BDAD
         Left            =   6000
         List            =   "Form_NFicha_Apoderado.frx":2BDAF
         Style           =   2  'Dropdown List
         TabIndex        =   7
         Top             =   2040
         Width           =   3495
      End
      Begin VB.ComboBox cmbeduca_apo 
         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_Apoderado.frx":2BDB1
         Left            =   6120
         List            =   "Form_NFicha_Apoderado.frx":2BDB3
         Style           =   2  'Dropdown List
         TabIndex        =   14
         Top             =   4080
         Width           =   3375
      End
      Begin VB.CommandButton Command4 
         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            =   1920
         Picture         =   "Form_NFicha_Apoderado.frx":2BDB5
         Style           =   1  'Graphical
         TabIndex        =   17
         Top             =   240
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.Label LblTipoF 
         AutoSize        =   -1  'True
         Caption         =   "+569"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   2745
         TabIndex        =   50
         Top             =   2670
         Width           =   360
      End
      Begin VB.Label Label13 
         Caption         =   "Telefono adicional 2"
         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        =   49
         Top             =   3120
         Width           =   2055
      End
      Begin VB.Label Label12 
         Caption         =   "Telefono adicional 1"
         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        =   48
         Top             =   3120
         Width           =   2175
      End
      Begin VB.Label lbl_emp_cel_ant 
         BackStyle       =   0  'Transparent
         Caption         =   "Celular:"
         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             =   2400
         Width           =   735
      End
      Begin VB.Label lbl_emp_fon_ant 
         BackStyle       =   0  'Transparent
         Caption         =   "Fono Trabajo:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4800
         TabIndex        =   43
         Top             =   2400
         Width           =   1815
      End
      Begin VB.Label lbl_fon_ant 
         BackStyle       =   0  'Transparent
         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        =   42
         Top             =   2400
         Width           =   1215
      End
      Begin VB.Label Label10 
         BackStyle       =   0  'Transparent
         Caption         =   "Email:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   7080
         TabIndex        =   41
         Top             =   2400
         Width           =   1695
      End
      Begin VB.Label lbl_emp_ant 
         BackStyle       =   0  'Transparent
         Caption         =   "Empresa donde Trabaja:"
         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        =   26
         Top             =   3840
         Width           =   2175
      End
      Begin VB.Label lbl_pro_ant 
         BackStyle       =   0  'Transparent
         Caption         =   "Ocupació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            =   4800
         TabIndex        =   25
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label lbl_niv_ant 
         BackStyle       =   0  'Transparent
         Caption         =   "Nivel Educacional:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6120
         TabIndex        =   24
         Top             =   3840
         Width           =   1695
      End
      Begin VB.Label lbl_rut_ant 
         BackStyle       =   0  'Transparent
         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        =   23
         Top             =   360
         Width           =   735
      End
      Begin VB.Label lbl_com_ant 
         BackStyle       =   0  'Transparent
         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            =   6000
         TabIndex        =   22
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label lbl_dir_ant 
         BackStyle       =   0  'Transparent
         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        =   21
         Top             =   1800
         Width           =   1215
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         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        =   20
         Top             =   1080
         Width           =   1695
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         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            =   2880
         TabIndex        =   19
         Top             =   1080
         Width           =   1935
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         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            =   6000
         TabIndex        =   18
         Top             =   1080
         Width           =   975
      End
   End
   Begin VB.TextBox ci_alu 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   1440
      Locked          =   -1  'True
      MaxLength       =   11
      TabIndex        =   15
      Top             =   240
      Width           =   1335
   End
   Begin VB.TextBox cl_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            =   1440
      Locked          =   -1  'True
      TabIndex        =   0
      Top             =   600
      Width           =   8415
   End
   Begin VB.Label Label11 
      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            =   7800
      TabIndex        =   45
      Top             =   7200
      Width           =   2055
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "El alumno debe tener apoderado"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   5760
      TabIndex        =   29
      Top             =   240
      Width           =   4095
   End
   Begin VB.Label Label2 
      Caption         =   "Alumno:"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   28
      Top             =   600
      Width           =   975
   End
   Begin VB.Label Label3 
      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        =   27
      Top             =   240
      Width           =   855
   End
End
Attribute VB_Name = "Form_NFicha_Apoderado"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



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

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

Private Sub ci_apo_KeyPress(KeyAscii As Integer)
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then Exit Sub
If KeyAscii = 8 Then Exit Sub
If KeyAscii = 32 Then Exit Sub
If KeyAscii = 13 Then
If IsNumeric(Me.ci_apo.Text) And Len(Trim(Me.ci_apo.Text)) > 6 Then
    txtRut.Text = Format(txtRut.Text, "00000000")
ElseIf (Len(Trim(Me.ci_apo.Text)) >= 1 And Len(Trim(Me.ci_apo.Text)) <= 6) Then
    MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
    Me.dig_apo.Text = ""
    Me.ci_apo.Text = ""
    ci_apo.SetFocus
End If
End If
KeyAscii = 0
End Sub

Private Sub ci_apo_LostFocus()
If dig_apo.Text <> "" Then
    If dig_apo.Text <> digito(Me.ci_apo.Text) Then
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        Me.dig_apo.Text = ""
        Me.ci_apo.Text = ""
        ci_apo.SetFocus
    End If
ElseIf ci_apo.Text <> "" Then
    dig_apo.SetFocus
End If
End Sub

Private Sub Command1_Click()
If Me.cmb_apocon.ItemData(Me.cmb_apocon.ListIndex) = 0 Then
    tipo_final = "N"
Else
    tipo_final = str(Me.cmb_apocon.ItemData(Me.cmb_apocon.ListIndex))
End If

If Trim(dig_apo.Text) <> "" And Trim(ci_apo.Text) <> "" Then
    ci = Trim(ci_apo.Text) & "-" & Trim(dig_apo.Text)
    
If verifdato(cel_apo) = False Or verifdato(email_apo) = False Or verifdato(ci_apo) = False Or verifdato(dig_apo) = False Or verifdato(Me.nom_apo) = False Or verifdato(Me.apemat_apo) = False Or verifdato(Me.apepat_apo) = False Or verifdato(Me.dir_apo) = False Or verifdato(Me.cmbcomuna_apo) = False Or dig_apo.Text = digito(Me.ci_apo.Text) = False Or verifdato(Me.cmb_apoparen) = False Then
    MsgBox "Faltan Datos", vbCritical, "Datos Faltantes"
Else
    
    
If IsNumeric(Me.cel_apo) = False Then
        MsgBox "El número Celular no puede contener caracteres", vbInformation
        Me.cel_apo.SetFocus
        Exit Sub
    End If
If txt_telefono_adicional_1.Text <> "" Then
    If IsNumeric(txt_telefono_adicional_1) = False Then
        MsgBox "Teléfono Adicionl 1 no puede tener caracteres", vbInformation
        txt_telefono_adicional_1.SetFocus
        Exit Sub
    End If
End If

If txt_telefono_adicional_2.Text <> "" Then
    If IsNumeric(txt_telefono_adicional_2) = False Then
        MsgBox "Teléfono Adicionl 2 no puede tener caracteres", vbInformation
        txt_telefono_adicional_2.SetFocus
        Exit Sub
    End If
End If

If fono_apo.Text <> "" Then
    If IsNumeric(fono_apo) = False Then
        MsgBox "Teléfono Apoderado no puede tener caracteres", vbInformation
        fono_apo.SetFocus
        Exit Sub
    End If
End If

If fonotra_apo.Text <> "" Then
    If IsNumeric(fonotra_apo.Text) = False Then
        MsgBox "Teléfono Trabajo no puede tener caracteres", vbInformation
        fonotra_apo.SetFocus
        Exit Sub
    End If
End If


'    If Me.email_apo.Text = "" Then
'        If MsgBox("¿Desea ingresar mail?", vbQuestion + vbYesNo) = vbYes Then
'            Exit Sub
'        End If
'    End If

            'Validacion de correo
        If Len(email_apo.Text) < 8 Or InStr(email_apo.Text, "@") = 0 Or InStr(email_apo.Text, ".") = 0 Then
            MsgBox "Correo no valido o no ingresado", vbInformation
            Exit Sub
        End If
        'se agrega 24-03-2022
        If Not Validar_Email(email_apo.Text) Then
            MsgBox "Correo no valido o no ingresado", vbInformation
            Exit Sub
        End If
        
        
        
        'Validacion de celular
        cel_apo.Text = val(cel_apo.Text)
        If Len(cel_apo.Text) < 8 Then
            MsgBox "Celular no valido o no ingresado", vbInformation
            Exit Sub
        End If

        If cmbeduca_apo.Text = "" Then
            MsgBox "Falta el nivel educacional del apoderado", vbInformation, "Faltan Datos"
            Exit Sub
        End If
        
            Set regsave = New ADODB.Recordset
            sqlreplazo = "insert into apoderados set rut_apo='" & ci & "',noms_apo=upper('" & Me.nom_apo.Text & "'), ape1_apo=upper('" & Me.apepat_apo.Text & "'), ape2_apo=upper('" & Me.apemat_apo.Text & "'), fon_c_apo='" & Me.fono_apo.Text & "', cel_apo='" & Me.LblTipoF.Caption & Me.cel_apo.Text & "'" & _
                ",empresa_fon='" & Me.fonotra_apo & "',empresa=upper('" & Me.empresa_apo.Text & "'),profesio_apo=upper('" & Me.ocu_apo.Text & "'),nivel_educ_apo='" & Me.cmbeduca_apo.Text & "', dir_apo=upper('" & Trim(Me.dir_apo.Text) & "'), comuna_apo='" & RetornaCampo("codigos__geograficos", "cod_geo", "comuna='" & Me.cmbcomuna_apo.List(Me.cmbcomuna_apo.ListIndex) & "'", conn) & "', cod_conv='" & tipo_final & _
                "',cod_tipo_apo='" & Me.cmb_apotipo.ItemData(Me.cmb_apotipo.ListIndex) & "',email='" & Trim(Me.email_apo.Text) & "',telefono_adicional_1 = '" & Me.txt_telefono_adicional_1.Text & "',telefono_adicional_2 = '" & Me.txt_telefono_adicional_2.Text & "' " & _
                "ON DUPLICATE KEY UPDATE noms_apo=upper('" & Me.nom_apo.Text & "'), ape1_apo=upper('" & Me.apepat_apo.Text & "'), ape2_apo=upper('" & Me.apemat_apo.Text & "'), fon_c_apo='" & Me.fono_apo.Text & "', cel_apo='" & Me.LblTipoF.Caption & Me.cel_apo.Text & "'" & _
                ",empresa_fon='" & Me.fonotra_apo & "',empresa=upper('" & Me.empresa_apo.Text & "'),profesio_apo=upper('" & Me.ocu_apo.Text & "'),nivel_educ_apo='" & Me.cmbeduca_apo.Text & "', dir_apo=upper('" & Trim(Me.dir_apo.Text) & "'), comuna_apo='" & RetornaCampo("codigos__geograficos", "cod_geo", "comuna='" & Me.cmbcomuna_apo.List(Me.cmbcomuna_apo.ListIndex) & "'", conn) & "', cod_conv='" & tipo_final & _
                "',cod_tipo_apo='" & Me.cmb_apotipo.ItemData(Me.cmb_apotipo.ListIndex) & "',email='" & Trim(Me.email_apo.Text) & "',telefono_adicional_1 = '" & Me.txt_telefono_adicional_1.Text & "',telefono_adicional_2 = '" & Me.txt_telefono_adicional_2.Text & "'"
            regsave.Open sqlreplazo, conn
            regsave.Open "Replace apo_x_ins set rut_apo='" & Trim(ci) & "',ci_alu='" & Trim(Me.ci_alu.Text) & "', parent_apo='" & Me.cmb_apoparen.Text & "'", conn
            MsgBox "Apoderado guardado con éxito", vbInformation, "Apoderado"
            Unload Me
            Exit Sub
    End If
End If

MsgBox "No se guardo el apoderado", vbCritical, "Apoderado"
End Sub

Private Sub Command2_Click(Index As Integer)
Dim buscaApo As ADODB.Recordset
Set buscaApo = New ADODB.Recordset
buscaApo.Open "Select rut_mad_alu, rut_pad_alu from postulantes where ci_alu='" & Me.ci_alu.Text & "'", conn

If IsNull(buscaApo!rut_mad_alu) And Index = 0 Then
    buscaApo.Close
    Exit Sub
ElseIf Index = 0 Then
    Me.ci_apo.Text = Mid(buscaApo!rut_mad_alu, 1, 8)
    Me.dig_apo.Text = Mid(buscaApo!rut_mad_alu, 10, 1)
    Me.cmb_apoparen.Text = "Madre"
    Command4_Click
    Exit Sub
End If

If IsNull(buscaApo!rut_pad_alu) And Index = 1 Then
    buscaApo.Close
    Exit Sub
Else
    Me.ci_apo.Text = Mid(buscaApo!rut_pad_alu, 1, 8)
    Me.dig_apo.Text = Mid(buscaApo!rut_pad_alu, 10, 1)
    Me.cmb_apoparen.Text = "Padre"
    Command4_Click
End If
buscaApo.Close
End Sub

Private Sub Command3_Click()
    Unload Me
End Sub

Private Sub Command4_Click()
Dim regBuscar As ADODB.Recordset
ci = ""
ediapo = False
ci = Trim(Me.ci_apo.Text) & "-" & Trim(Me.dig_apo.Text)
Set regBuscar = New ADODB.Recordset

If ci = "-" Then
    regBuscar.Open "select * from apo_x_ins where ci_alu='" & Me.ci_alu.Text & "'", conn
    If regBuscar.RecordCount = 0 Or IsNull(regBuscar!rut_apo) Then
        regBuscar.Close

        Exit Sub
    Else
        ci = regBuscar!rut_apo
        Me.ci_apo.Text = Mid(ci, 1, 8)
        Me.dig_apo.Text = Mid(ci, 10, 1)
        Me.cmb_apoparen.Text = regBuscar!Parent_apo
        regBuscar.Close
    End If
End If
regBuscar.Open "select * from apoderados where rut_apo='" & ci & "'", conn

If regBuscar.RecordCount = 1 Then
    Me.nom_apo.Text = regBuscar!Noms_Apo
    Me.apepat_apo.Text = regBuscar!ape1_apo
    Me.apemat_apo.Text = regBuscar!ape2_apo
    Me.dir_apo.Text = regBuscar!dir_apo
    buscacombo val(regBuscar!comuna_apo), Me.cmbcomuna_apo
    Me.fono_apo.Text = regBuscar!fon_c_apo
    
    If Mid(regBuscar!cel_apo, 1, 4) = "+569" Or Mid(regBuscar!cel_apo, 1, 4) = "0562" Then
        LblTipoF.Caption = Mid(regBuscar!cel_apo, 1, 4)
        Me.cel_apo.Text = Mid(regBuscar!cel_apo, 5, 8)
        
    Else
        If Len(regBuscar!cel_apo) > 8 Then
            Me.cel_apo.Text = Mid(regBuscar!cel_apo, Len(regBuscar!cel_apo) - 7)
        Else
            Me.cel_apo.Text = regBuscar!cel_apo
        End If
        
        'Me.cel_apo.Text = regBuscar!cel_apo
    End If
    
    Me.fonotra_apo.Text = regBuscar!empresa_fon
    Me.empresa_apo.Text = regBuscar!empresa
    Me.ocu_apo.Text = regBuscar!profesio_apo
    Me.cmbeduca_apo.Text = regBuscar!nivel_educ_apo
    
    If Not IsNull(regBuscar!telefono_adicional_1) Then
        Me.txt_telefono_adicional_1.Text = regBuscar!telefono_adicional_1
    End If
    
    If Not IsNull(regBuscar!telefono_adicional_2) Then
        Me.txt_telefono_adicional_2.Text = regBuscar!telefono_adicional_2
    End If
    
    If Not IsNull(regBuscar!email) Then
        Me.email_apo.Text = regBuscar!email
    End If
    
    If Not IsNull(regBuscar!cod_conv) And UCase(regBuscar!cod_conv) <> "N" Then
        buscacombo regBuscar!cod_conv, Me.cmb_apocon
    Else
        buscacombo 0, Me.cmb_apocon
    End If
End If
regBuscar.Clone


End Sub

Private Sub dig_apo_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 dig_apo_LostFocus()
    If dig_apo.Text <> "" And ci_apo.Text <> "" And dig_apo = digito(Me.ci_apo.Text, False) Then
        Command4_Click
    ElseIf Trim(dig_apo.Text) <> "" Or Trim(ci_apo.Text) <> "" Then
        MsgBox "ADVERTENCIA: EL RUT INGRESADO NO ES VALIDO!!", vbOKOnly, "ADVERTENCIA"
        dig_apo.Text = ""
        ci_apo.Text = ""
        ci_apo.SetFocus
    End If
End Sub

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

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

Private Sub Form_Load()
Me.ci_alu.Text = Form_NFicha_Inscripcion.ci_aluaca
Me.cl_nombre.Text = Form_NFicha_Inscripcion.cl_nombre
If Me.ci_alu.Text = "" Then
    Exit Sub
End If
llenarcombo Me.cmbcomuna_apo, "Select cod_geo as ind, comuna as lab from codigos__geograficos"
llenarcombo Me.cmbeduca_apo, "Select id as ind, Nivel as lab from nivel_educa"
llenarcombo Me.cmb_apoparen, "Select id as ind, parentezco as lab from parentezco"
llenarcombo Me.cmb_apotipo, "Select cod_tipo_apo as ind, des_tipo_apo as lab from tipo_apo"
llenarcombo Me.cmb_apocon, "Select cod_conv as ind , des_conv as lab from convenios ORDER BY COD_CONV"
Me.cmbcomuna_apo.ListIndex = 0
Me.cmb_apotipo.ListIndex = 0
Me.cmb_apocon.Text = "NINGUNO"
Me.cmbeduca_apo.ListIndex = 3
Command4_Click
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
Private Sub buscacombo(clx As Long, nox As ComboBox)

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
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 Form_Unload(Cancel As Integer)
    Form_NFicha_Inscripcion.Command1_Click
End Sub

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

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