VERSION 5.00
Object = "{0F987290-56EE-11D0-9C43-00A0C90F29FC}#1.0#0"; "ActBar.ocx"
Begin VB.Form FCO1060 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Datos adicionales de la compañia"
   ClientHeight    =   6480
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10590
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Datos Adicionales Cia.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6480
   ScaleWidth      =   10590
   Begin VB.Frame Frame2 
      Caption         =   "Otros Datos"
      Height          =   1665
      Left            =   5400
      TabIndex        =   49
      Top             =   4095
      Width           =   5055
      Begin VB.CheckBox chkIssRedondea 
         Alignment       =   1  'Right Justify
         Caption         =   "ISS Redondea"
         Height          =   255
         Left            =   120
         TabIndex        =   54
         Top             =   720
         Width           =   1575
      End
      Begin VB.TextBox txtCodAdmon 
         Height          =   285
         Left            =   2205
         MaxLength       =   40
         TabIndex        =   51
         Top             =   270
         Width           =   2730
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Código Administración (CIR)"
         Height          =   210
         Index           =   21
         Left            =   90
         TabIndex        =   50
         Top             =   270
         Width           =   2010
      End
   End
   Begin VB.Frame fraFrame 
      Caption         =   "I.C.B.F."
      Height          =   1695
      Index           =   3
      Left            =   240
      TabIndex        =   40
      Top             =   4080
      Width           =   5055
      Begin VB.TextBox txtNomICBF 
         Height          =   285
         Left            =   1440
         MaxLength       =   30
         TabIndex        =   44
         Top             =   600
         Width           =   3495
      End
      Begin VB.TextBox txtNitICBF 
         Height          =   285
         Left            =   1440
         MaxLength       =   11
         TabIndex        =   42
         Top             =   240
         Width           =   1695
      End
      Begin VB.TextBox txtDirICBF 
         Height          =   285
         Left            =   1440
         MaxLength       =   50
         TabIndex        =   46
         Top             =   960
         Width           =   3495
      End
      Begin VB.TextBox txtTelICBF 
         Height          =   285
         Left            =   1440
         MaxLength       =   20
         TabIndex        =   48
         Top             =   1320
         Width           =   1695
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Nombre"
         Height          =   210
         Index           =   20
         Left            =   120
         TabIndex        =   43
         Top             =   600
         Width           =   555
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "&NIT"
         Height          =   210
         Index           =   19
         Left            =   120
         TabIndex        =   41
         Top             =   240
         Width           =   225
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Dirección"
         Height          =   210
         Index           =   18
         Left            =   120
         TabIndex        =   45
         Top             =   960
         Width           =   675
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Teléfono"
         Height          =   210
         Index           =   17
         Left            =   120
         TabIndex        =   47
         Top             =   1320
         Width           =   630
      End
   End
   Begin VB.Frame fraFrame 
      Caption         =   "SENA"
      Height          =   1695
      Index           =   2
      Left            =   5400
      TabIndex        =   31
      Top             =   2280
      Width           =   5055
      Begin VB.TextBox txtNomSENA 
         Height          =   285
         Left            =   1440
         MaxLength       =   30
         TabIndex        =   35
         Top             =   600
         Width           =   3495
      End
      Begin VB.TextBox txtNitSENA 
         Height          =   285
         Left            =   1440
         MaxLength       =   11
         TabIndex        =   33
         Top             =   240
         Width           =   1695
      End
      Begin VB.TextBox txtDirSENA 
         Height          =   285
         Left            =   1440
         MaxLength       =   50
         TabIndex        =   37
         Top             =   960
         Width           =   3495
      End
      Begin VB.TextBox txtTelSENA 
         Height          =   285
         Left            =   1440
         MaxLength       =   20
         TabIndex        =   39
         Top             =   1320
         Width           =   1695
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Nombre"
         Height          =   210
         Index           =   16
         Left            =   120
         TabIndex        =   34
         Top             =   600
         Width           =   555
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "&NIT"
         Height          =   210
         Index           =   15
         Left            =   120
         TabIndex        =   32
         Top             =   240
         Width           =   225
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Dirección"
         Height          =   210
         Index           =   14
         Left            =   120
         TabIndex        =   36
         Top             =   960
         Width           =   675
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Teléfono"
         Height          =   210
         Index           =   13
         Left            =   120
         TabIndex        =   38
         Top             =   1320
         Width           =   630
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Forma de Presentación de la Autoliquidación de Aportes"
      Height          =   700
      Left            =   240
      TabIndex        =   11
      Top             =   1515
      Width           =   5055
      Begin VB.ComboBox cboFormaPres 
         Height          =   330
         ItemData        =   "Datos Adicionales Cia.frx":030A
         Left            =   1800
         List            =   "Datos Adicionales Cia.frx":0317
         Style           =   2  'Dropdown List
         TabIndex        =   13
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Forma"
         Height          =   210
         Index           =   9
         Left            =   480
         TabIndex        =   12
         Top             =   240
         Width           =   450
      End
   End
   Begin VB.Frame fraFrame 
      Caption         =   "A.R.P."
      Height          =   1695
      Index           =   0
      Left            =   240
      TabIndex        =   21
      Top             =   2280
      Width           =   5055
      Begin VB.TextBox txtCodArp 
         Height          =   285
         Left            =   4080
         MaxLength       =   11
         TabIndex        =   56
         Top             =   1320
         Width           =   855
      End
      Begin VB.TextBox txtTelARP 
         Height          =   285
         Left            =   1440
         MaxLength       =   20
         TabIndex        =   30
         Top             =   1320
         Width           =   1695
      End
      Begin VB.TextBox txtDirARP 
         Height          =   285
         Left            =   1440
         MaxLength       =   50
         TabIndex        =   28
         Top             =   960
         Width           =   3495
      End
      Begin VB.CheckBox chkARP_ISS 
         Caption         =   "I.S.S."
         Height          =   255
         Left            =   4200
         TabIndex        =   24
         Top             =   240
         Width           =   735
      End
      Begin VB.TextBox txtNitARP 
         Height          =   285
         Left            =   1440
         MaxLength       =   11
         TabIndex        =   23
         Top             =   240
         Width           =   1695
      End
      Begin VB.TextBox txtNomARP 
         Height          =   285
         Left            =   1440
         MaxLength       =   30
         TabIndex        =   26
         Top             =   585
         Width           =   3495
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Cod.ARP"
         Height          =   210
         Index           =   22
         Left            =   3240
         TabIndex        =   55
         Top             =   1320
         Width           =   645
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Teléfono"
         Height          =   210
         Index           =   12
         Left            =   120
         TabIndex        =   29
         Top             =   1320
         Width           =   630
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Dirección"
         Height          =   210
         Index           =   11
         Left            =   120
         TabIndex        =   27
         Top             =   960
         Width           =   675
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "&NIT"
         Height          =   210
         Index           =   5
         Left            =   120
         TabIndex        =   22
         Top             =   240
         Width           =   225
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Nombre"
         Height          =   210
         Index           =   6
         Left            =   120
         TabIndex        =   25
         Top             =   600
         Width           =   555
      End
   End
   Begin VB.Frame fraFrame 
      Caption         =   "Información de Retención en la Fuente"
      Height          =   2055
      Index           =   1
      Left            =   5385
      TabIndex        =   14
      Top             =   150
      Width           =   5055
      Begin VB.TextBox txtAgencias 
         Height          =   735
         Left            =   225
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   20
         Top             =   1185
         Width           =   4695
      End
      Begin VB.TextBox txtCodigoRet 
         Height          =   285
         Left            =   1680
         MaxLength       =   60
         TabIndex        =   18
         Top             =   600
         Width           =   3255
      End
      Begin VB.TextBox txtNombreRet 
         Height          =   285
         Left            =   1680
         MaxLength       =   60
         TabIndex        =   16
         Top             =   240
         Width           =   3255
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Agencias o Sucursales"
         Height          =   210
         Index           =   3
         Left            =   240
         TabIndex        =   19
         Top             =   960
         Width           =   1695
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Cedula Retenedor"
         Height          =   210
         Index           =   10
         Left            =   240
         TabIndex        =   17
         Top             =   600
         Width           =   1290
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Nombre Retenedor"
         Height          =   210
         Index           =   7
         Left            =   240
         TabIndex        =   15
         Top             =   240
         Width           =   1350
      End
   End
   Begin VB.CheckBox chkAportante 
      Alignment       =   1  'Right Justify
      Caption         =   "&Grande Aportante"
      Height          =   210
      Left            =   3360
      TabIndex        =   8
      Top             =   840
      Width           =   1935
   End
   Begin VB.TextBox txtNroPatronal 
      Height          =   285
      Left            =   4080
      MaxLength       =   11
      TabIndex        =   53
      Top             =   5865
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.TextBox txtFax 
      Height          =   285
      Left            =   1680
      MaxLength       =   20
      TabIndex        =   10
      Top             =   1200
      Width           =   1335
   End
   Begin VB.ComboBox cboTipoID 
      Height          =   330
      ItemData        =   "Datos Adicionales Cia.frx":0339
      Left            =   1680
      List            =   "Datos Adicionales Cia.frx":0346
      Style           =   2  'Dropdown List
      TabIndex        =   3
      Top             =   480
      Width           =   975
   End
   Begin VB.Image imgListaCiudad 
      Height          =   480
      Left            =   2880
      Picture         =   "Datos Adicionales Cia.frx":0357
      Top             =   855
      Width           =   480
   End
   Begin VB.Label lblCiudad 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Height          =   255
      Left            =   2160
      TabIndex        =   7
      Top             =   840
      Width           =   615
   End
   Begin VB.Label lblDpto 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Height          =   255
      Left            =   1680
      TabIndex        =   6
      Top             =   840
      Width           =   375
   End
   Begin ActiveBarLibraryCtl.ActiveBar abToolbar 
      Left            =   480
      Top             =   5880
      _ExtentX        =   847
      _ExtentY        =   847
      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
      Bands           =   "Datos Adicionales Cia.frx":0661
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Nro Patronal (ISS)"
      Height          =   210
      Index           =   8
      Left            =   7440
      TabIndex        =   52
      Top             =   1080
      Visible         =   0   'False
      Width           =   1290
   End
   Begin VB.Label lblNIT 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Caption         =   "nro nit"
      Height          =   315
      Left            =   2760
      TabIndex        =   4
      Top             =   480
      Width           =   2565
   End
   Begin VB.Label lblCia 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Label1"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1680
      TabIndex        =   1
      Top             =   120
      Width           =   1125
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Fax"
      Height          =   210
      Index           =   4
      Left            =   360
      TabIndex        =   9
      Top             =   1200
      Width           =   270
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Dpto y Ciudad"
      Height          =   210
      Index           =   2
      Left            =   360
      TabIndex        =   5
      Top             =   840
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Tipo Identificación"
      Height          =   210
      Index           =   1
      Left            =   360
      TabIndex        =   2
      Top             =   480
      Width           =   1290
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Compañia"
      Height          =   210
      Index           =   0
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   705
   End
End
Attribute VB_Name = "FCO1060"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private MAdo As ODBC.ODBCDirecto
Private Micx As Integer 'Conexión
Private MiX As Integer 'Ancho de la forma
Private MiY As Integer 'Alta de la forma
Private MsSql As String
Private MSOrder As String

Private Sub abToolbar_Click(ByVal Tool As ActiveBarLibraryCtl.Tool)
    Select Case LCase(Tool.Name)
        Case "tlguarda"
            GuardaCambios
        Case "tlsalida"
            Unload Me
    End Select
End Sub

Private Sub cboFormaPres_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub cboTipoID_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub chkARP_ISS_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub Form_Activate()
    WindowState = 0
    Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
        Case vbKeyF3: Unload Me
        Case vbKeyF11: GuardaCambios
    End Select

End Sub

Private Sub Form_Load()
    GbAError = False
    Me.Tag = GiVenMax%
    Gven(Val(Me.Tag)).icx = Gicx%
    Micx = Gven(Val(Me.Tag)).icx
    Set MAdo = Gtc(Micx).Ado
    Me.Icon = LoadPicture(sIconoForma)

    'Checa nivel de seguridad
    Gven(Val(Me.Tag)).iNivSeguridad = iObtenNivSeguridad(GsOper, GsUid, Micx)
    If Gven(Val(Me.Tag)).iNivSeguridad = 0 Then
        Screen.MousePointer = vbDefault
        Me.Top = -10000
        GbAError = True
        Exit Sub
    End If
    
    If Not MDIChild Then
        WindowState = 0
        Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
        Screen.MousePointer = vbDefault
    End If
    
    'Tamaño de la forma
    If Me.WindowState = 0 Then
        MiX = 10680
        MiY = 6855
        Me.Width = MiX
        Me.Height = MiY
    End If

    Caption = GsDsn & " / " & GsCveCia & " - Datos Adicionales Compañia"
    
    AsignaIconos abToolbar, 3, LGUARDA, LSALIDA
    ToolInicioGrupo abToolbar, 3, True, 1
    
    lblCia = GsCveCia
    RecuperarDatos
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Set MAdo = Nothing
    Gtc(Micx).ihijas = Gtc(Micx).ihijas - 1
    Set FCO1060 = Nothing
End Sub

Private Sub Form_Unload(Cancel As Integer)
    If GbExterno Then End
End Sub

Private Sub imgListaCiudad_Click()
    GsParamIN(0) = "SELECT codigo, nombre" & _
    " FROM fco_departamentos WHERE 1=1"
    GsParamIN(1) = "codigo"
    GsParamIN(2) = "nombre"
    GsParamIN(3) = "Codigo"
    GsParamIN(4) = "Nombre"
    GsParamIN(6) = ""
    GsParamIN(5) = "Departamentos"
    frmLista.Show 1
    If Trim(GsParamOUT(0)) <> "" Then
        lblDpto = Trim(GsParamOUT(0))
        GsParamIN(0) = "SELECT codigo, nombre" & _
        " FROM fco_ciudades" & _
        " WHERE cod_dpto='" & lblDpto & "'"
        GsParamIN(5) = "Municipios"
    Else
        Exit Sub
    End If
    frmLista.Show 1
    If Trim(GsParamOUT(0)) <> "" Then
        lblCiudad = Trim(GsParamOUT(0))
    End If
End Sub

Private Sub txtAgencias_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtCodAdmon_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtCodigoRet_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtDirARP_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtDirICBF_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtDirSENA_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtFax_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtNitARP_KeyPress(KeyAscii As Integer)
    KeyAscii = iValidarDato(KeyAscii, "0123456789-", True, True)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtNitICBF_KeyPress(KeyAscii As Integer)
    KeyAscii = iValidarDato(KeyAscii, "0123456789-", True, True)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtNitSENA_KeyPress(KeyAscii As Integer)
    KeyAscii = iValidarDato(KeyAscii, "0123456789-", True, True)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtNomARP_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub GuardaCambios()
    On Error GoTo Salir
    
    If cboFormaPres.ListIndex = -1 Then cboFormaPres.ListIndex = 0
    If cboTipoID.ListIndex = -1 Then cboTipoID = 0
    
    MAdo.Sql = "sp_fco_cambio_cias_datos_adi " & _
    "'" & GsCveCia & "','" & Trim(cboTipoID.Text) & "','" & _
    lblDpto & "','" & lblCiudad & "','" & _
    txtFax & "','" & txtNitARP & "','" & txtNomARP & "'," & _
    "'" & IIf(chkAportante.Value = vbChecked, "G", "P") & "','" & Left(cboFormaPres.Text, 1) & "'," & _
    "'001','" & txtNroPatronal & "'," & _
    "'" & txtNombreRet & "','" & txtCodigoRet & "','" & txtAgencias & "'," & _
    IIf(chkARP_ISS.Value = vbChecked, 1, 0) & ", '" & txtDirARP & "', '" & txtTelARP & "'," & _
    "'" & txtNitSENA & "','" & txtNomSENA & "','" & txtDirSENA & "','" & txtTelSENA & "'," & _
    "'" & txtNitICBF & "','" & txtNomICBF & "','" & txtDirICBF & "','" & txtTelICBF & "','" & txtCodAdmon & "'," & _
    IIf(chkIssRedondea.Value = vbChecked, 1, 0) & ",'" & txtCodArp & "'"
    
    If MAdo.ExecSQL <> -1 Then
        clsMsgbox.Mensaje "Datos correctamente actualizados", mAceptar, minforma, GsTitMsg
        RecuperarDatos
    End If
    Exit Sub
Salir:
    clsMsgbox.Mensaje "Ocurrio el error no esperado " & Err.Number & " " & Err.Description, mAceptar, minforma, GsTitMsg
End Sub

Private Sub RecuperarDatos()
    MAdo.Sql = _
    " SELECT" & _
      " compania, tipo_id, fax, nit_ARP, nombre_ARP," & _
      " clase_aportante, sucursal_pagadora, nro_patronal, forma_presentacion," & _
      " cod_ciudad, cod_dpto, registro_fiscal," & _
      " nombre_retenedor, cedula_retenedor, agencias, arp_iss," & _
      " dir_ARP, tel_ARP, nombre_SENA, nit_SENA, dir_SENA, tel_SENA," & _
      " nombre_ICBF, nit_ICBF, dir_ICBF, tel_ICBF, cod_admon, iss_redondea, cod_ARP" & _
    " FROM vw_fco_cias_datos_adi" & _
    " WHERE compania='" & GsCveCia & "'"
    
    MAdo.SendSQL
    
    If Not MAdo.EOF Then
        Select Case UCase("" & MAdo.GetField(2)) 'tipo_id
            Case "NIT": cboTipoID.ListIndex = 0
            Case "CC": cboTipoID.ListIndex = 1
            Case "CE": cboTipoID.ListIndex = 2
        End Select
        lblNIT = "" & MAdo.GetField(12) 'registro_fiscal
        lblDpto = "" & MAdo.GetField(11) 'cod_dpto
        lblCiudad = "" & MAdo.GetField(10) 'cod_ciudad
        txtFax = "" & MAdo.GetField(3) 'fax
        chkAportante.Value = IIf("" & MAdo.GetField(6) = "G", vbChecked, vbUnchecked) 'clase_aportante
        txtNitARP = "" & MAdo.GetField(4) 'nit_ARP
        txtNomARP = "" & MAdo.GetField(5) 'nombre_ARP
        txtDirARP = "" & MAdo.GetField(17) 'dir_ARP
        txtTelARP = "" & MAdo.GetField(18) 'tel_ARP
        cboFormaPres.ListIndex = -1
        Select Case MAdo.GetField(9) 'forma_presentacion
            Case "C": cboFormaPres.ListIndex = 0
            Case "S": cboFormaPres.ListIndex = 1
            Case "U": cboFormaPres.ListIndex = 2
        End Select
        txtNroPatronal = "" & MAdo.GetField(8) 'Nro_patronal
        txtNombreRet = "" & MAdo.GetField(13) 'nombre_retenedor
        txtCodigoRet = "" & MAdo.GetField(14) 'cedula_retenedor
        txtAgencias = "" & MAdo.GetField(15) 'agencias
        chkARP_ISS.Value = IIf(Val("" & MAdo.GetField(16)) = 1, vbChecked, vbUnchecked) 'arp_iss
        txtNitSENA = "" & MAdo.GetField(20) 'nit_SENA
        txtNomSENA = "" & MAdo.GetField(19)  'nombre_SENA
        txtDirSENA = "" & MAdo.GetField(21) 'dir_SENA
        txtTelSENA = "" & MAdo.GetField(22) 'tel_SENA
        txtNitICBF = "" & MAdo.GetField(24) 'nit_ICBF
        txtNomICBF = "" & MAdo.GetField(23) 'nombre_ICBF
        txtDirICBF = "" & MAdo.GetField(25) 'dir_ICBF
        txtTelICBF = "" & MAdo.GetField(26) 'tel_ICBF
        txtCodAdmon = "" & MAdo.GetField(27) 'codigo de admon
        If Val("" & MAdo.GetField(28)) = 1 Then 'Iss Redondea?
            chkIssRedondea.Value = vbChecked
        Else
            chkIssRedondea.Value = vbUnchecked
        End If
        txtCodArp = "" & MAdo.GetField(29)
    End If
    
End Sub

Private Sub txtNombreRet_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtNomICBF_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtNomSENA_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtTelARP_KeyPress(KeyAscii As Integer)
    KeyAscii = iValidarDato(KeyAscii, "0123456789", True, True)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtTelICBF_KeyPress(KeyAscii As Integer)
    KeyAscii = iValidarDato(KeyAscii, "0123456789", True, True)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub

Private Sub txtTelSENA_KeyPress(KeyAscii As Integer)
    KeyAscii = iValidarDato(KeyAscii, "0123456789", True, True)
    If KeyAscii = vbKeyReturn Then SendEnter
End Sub
