VERSION 5.00
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "crystl32.ocx"
Begin VB.Form form_SolicitudSoporte 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Solicitud de Soporte"
   ClientHeight    =   6600
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   11295
   Icon            =   "form_SolicitudSoporte.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6600
   ScaleWidth      =   11295
   Begin Crystal.CrystalReport cr 
      Left            =   840
      Top             =   5880
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   348160
      PrintFileLinesPerPage=   60
   End
   Begin VB.Frame frame_ticket 
      Height          =   3015
      Left            =   2400
      TabIndex        =   34
      Top             =   3360
      Visible         =   0   'False
      Width           =   6255
      Begin VB.CommandButton cmd_Salir 
         Caption         =   "Salir de Soporte"
         Height          =   375
         Left            =   3480
         TabIndex        =   37
         Top             =   2520
         Width           =   1455
      End
      Begin VB.CommandButton cmd_imprimir 
         Caption         =   "Imprimir"
         Height          =   375
         Left            =   1080
         TabIndex        =   36
         Top             =   2520
         Width           =   1455
      End
      Begin VB.Label lbl_colegio 
         Caption         =   "Label5"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2160
         TabIndex        =   42
         Top             =   1560
         Width           =   3975
      End
      Begin VB.Label lbl_user 
         Caption         =   "Label5"
         Height          =   255
         Left            =   120
         TabIndex        =   41
         Top             =   840
         Width           =   6015
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         Caption         =   "(Sugerimos imprima este numero de ticket)"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   495
         Left            =   240
         TabIndex        =   40
         Top             =   2040
         Width           =   5895
      End
      Begin VB.Label lbl_numero_ticket 
         Alignment       =   1  'Right Justify
         Caption         =   "Label4"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   24
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1080
         TabIndex        =   39
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         Caption         =   "Generación de Ticket"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   38
         Top             =   360
         Width           =   6015
      End
      Begin VB.Label Label2 
         Caption         =   "Nro. Ticket:"
         Height          =   255
         Left            =   120
         TabIndex        =   35
         Top             =   1440
         Width           =   855
      End
   End
   Begin VB.Frame opt_detalles 
      Caption         =   "Otros"
      ForeColor       =   &H00FF0000&
      Height          =   2415
      Left            =   1680
      TabIndex        =   12
      Top             =   720
      Width           =   9495
      Begin VB.OptionButton Option2 
         Caption         =   "Option19"
         Height          =   255
         Index           =   17
         Left            =   6840
         TabIndex        =   33
         Top             =   2040
         Visible         =   0   'False
         Width           =   2535
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option18"
         Height          =   255
         Index           =   11
         Left            =   3480
         TabIndex        =   32
         Top             =   2040
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option17"
         Height          =   255
         Index           =   5
         Left            =   120
         TabIndex        =   31
         Top             =   2040
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option16"
         Height          =   255
         Index           =   16
         Left            =   6840
         TabIndex        =   30
         Top             =   1680
         Visible         =   0   'False
         Width           =   2535
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option15"
         Height          =   255
         Index           =   10
         Left            =   3480
         TabIndex        =   29
         Top             =   1680
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option14"
         Height          =   255
         Index           =   4
         Left            =   120
         TabIndex        =   28
         Top             =   1680
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option13"
         Height          =   255
         Index           =   15
         Left            =   6840
         TabIndex        =   27
         Top             =   1320
         Visible         =   0   'False
         Width           =   2535
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option12"
         Height          =   255
         Index           =   9
         Left            =   3480
         TabIndex        =   26
         Top             =   1320
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option11"
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   25
         Top             =   1320
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option10"
         Height          =   255
         Index           =   14
         Left            =   6840
         TabIndex        =   24
         Top             =   960
         Visible         =   0   'False
         Width           =   2535
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option9"
         Height          =   255
         Index           =   8
         Left            =   3480
         TabIndex        =   23
         Top             =   960
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option8"
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   22
         Top             =   960
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option7"
         Height          =   255
         Index           =   13
         Left            =   6840
         TabIndex        =   21
         Top             =   600
         Visible         =   0   'False
         Width           =   2535
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option6"
         Height          =   255
         Index           =   7
         Left            =   3480
         TabIndex        =   20
         Top             =   600
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option5"
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   19
         Top             =   600
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option4"
         Height          =   255
         Index           =   12
         Left            =   6840
         TabIndex        =   18
         Top             =   240
         Visible         =   0   'False
         Width           =   2535
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Option3"
         Height          =   255
         Index           =   6
         Left            =   3480
         TabIndex        =   17
         Top             =   240
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.OptionButton Option2 
         Caption         =   "aaaaaaaaaaaaaaaaaaaa"
         Height          =   255
         Index           =   0
         Left            =   120
         TabIndex        =   16
         Top             =   240
         Visible         =   0   'False
         Width           =   3255
      End
   End
   Begin VB.Frame frm_detalle 
      Caption         =   "Detalle Solicitud"
      ForeColor       =   &H00FF0000&
      Height          =   2175
      Left            =   120
      TabIndex        =   13
      Top             =   3240
      Width           =   11055
      Begin VB.TextBox txt_descripcion 
         Height          =   1095
         Left            =   240
         MultiLine       =   -1  'True
         TabIndex        =   14
         Top             =   360
         Width           =   10575
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         Caption         =   "(Por favor describa la solicitud.)"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1440
         TabIndex        =   15
         Top             =   1560
         Width           =   8055
      End
   End
   Begin VB.Frame Frame3 
      Height          =   975
      Left            =   5880
      TabIndex        =   8
      Top             =   5520
      Width           =   5295
      Begin VB.CommandButton cmd_sal 
         Caption         =   "Salir"
         Height          =   495
         Left            =   3720
         TabIndex        =   11
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton cmd_limpiar 
         Caption         =   "Limpiar"
         Height          =   495
         Left            =   1980
         TabIndex        =   10
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton cmd_Ticket 
         Caption         =   "Ticket"
         Height          =   495
         Left            =   240
         TabIndex        =   9
         Top             =   240
         Width           =   1335
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Tipo de Soporte"
      ForeColor       =   &H00FF0000&
      Height          =   2415
      Left            =   120
      TabIndex        =   1
      Top             =   720
      Width           =   1455
      Begin VB.OptionButton Option1 
         Caption         =   "Otros"
         Height          =   255
         Index           =   5
         Left            =   120
         TabIndex        =   7
         Top             =   2040
         Width           =   855
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Email"
         Height          =   375
         Index           =   4
         Left            =   120
         TabIndex        =   6
         Top             =   1680
         Width           =   855
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Internet"
         Height          =   375
         Index           =   3
         Left            =   120
         TabIndex        =   5
         Top             =   1320
         Width           =   975
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Gescol"
         Height          =   375
         Index           =   2
         Left            =   120
         TabIndex        =   4
         Top             =   960
         Width           =   975
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Software"
         Height          =   375
         Index           =   1
         Left            =   120
         TabIndex        =   3
         Top             =   600
         Width           =   975
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Hardware"
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   2
         Top             =   240
         Width           =   1095
      End
   End
   Begin VB.Label lbl_usuario 
      Caption         =   "Label1"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00004000&
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   11055
   End
End
Attribute VB_Name = "form_SolicitudSoporte"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Letra, codigo_detalle As String

Private Sub cmd_imprimir_Click()
    Dim var_sql, tipo_soporte, funcionario, tic, rut_per, Cadena, aux1, aux2 As String
    Dim sw As Boolean
    Dim Folio, i, Ind, linea, largo As Integer
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset

    'Obtengo codigo del detalle
    For i = 0 To 17
        If Option2(i).Value = True Then codigo_detalle = Option2(i).Caption
    Next i
    var_sql = "select codigo_detalle from spte_opcion where descrip_detalle = '" & codigo_detalle & "'"
    objRS.Open var_sql, conn
    codigo_detalle = objRS("codigo_detalle")
    objRS.Close

    'Obtengo codigo del colegio
    var_sql = "select valor from cfg where param = 'codbc'"
    objRS.Open var_sql, conn

    var_sql = "insert into spte_solicitud(solicitud,cod_colegio,login_usuario,fecha)" _
            & " values('" & Letra & codigo_detalle & "','" & objRS("valor") & "','" _
            & Nom_usu_ses & "',concat(current_date,' ',current_time))"
    conn.Execute var_sql
    objRS.Close
    var_sql = "select max(folio) as f from spte_solicitud"
    objRS.Open var_sql, conn
    
    
    'Ingresar detalle y quitar enter
    largo = Len(txt_descripcion.Text)
    Cadena = txt_descripcion.Text
'    i = 1
'    While i < largo
'        If CInt(Asc(Mid(cadena, i, 1))) = 13 Then
'            aux1 = ""
'            aux2 = ""
'            If i > 2 Then
'                aux1 = Mid(cadena, 1, i - 1)
'            End If
'            If i < (largo - 1) Then
'                aux2 = Mid(cadena, i + 2, largo)
'            End If
'            cadena = aux1 & aux2
'            largo = largo - 2
'            i = i - 2
'        End If
'        i = i + 1
'    Wend
    Cadena = Replace(Cadena, vbCrLf, " ")
       
       
        
    var_sql = "insert into spte_detalle_solic(folio,texto_solicitud)" _
            & " values(" & objRS("f") & ",'" & Cadena & "')"
    Folio = objRS("f")
    conn.Execute var_sql
    
    
    objRS.Close
    var_sql = "insert into spte_ticket(folio_solicitud,estado_actual,asignado)" _
            & " values(" & Folio & ",'Abierto','NO')"
    conn.Execute var_sql
    
    frame_ticket.Visible = False
    
     
     'Compruebo que no sea Gescol ni Otros
     If Letra = "g" Or Letra = "o" Then
        cmd_limpiar_Click
        generar_reporte (Folio)
        Exit Sub
     End If
     
     'Obtengo el personal de soporte
     var_sql = "SELECT * FROM cfg where param = 'SopPer'"
     objRS.Open var_sql, conn
     funcionario = objRS("valor")
     objRS.Close
     
     'Obtengo el numero de ticket
     var_sql = "select max(numero_ticket) as t from spte_ticket"
     objRS.Open var_sql, conn
     tic = objRS("t")
     objRS.Close
     
     'Obtengo rut del personal de soporte
     var_sql = "select rut_personal r from spte_personal where usuario = '" & funcionario & "'"
     objRS.Open var_sql, conn
     rut_per = objRS("r")
     objRS.Close
     
     'Asigno a un requerimiento a un personal de soporte
    var_sql = "insert into spte_asignacion(folio_solicitud,rut_personal_soporte," _
            & "fecha_recepcion,hora_recepcion,ticket,usuario_asignador," _
            & "fecha_asignacion,hora_asignacion," _
            & "fecha_final,hora_final)" _
            & " values(" & Folio _
            & ",'" & rut_per _
            & "',current_date,current_time," _
            & tic & ",'" _
            & funcionario & "',current_date,current_time," _
            & "'1111-11-11','11:11:11')"
    conn.Execute var_sql
        
    'Cambio los estados al ticket
    var_sql = "update spte_ticket set asignado = 'SI',estado_actual = 'Pendiente' where numero_ticket = " _
    & tic
    conn.Execute var_sql
    generar_reporte (Folio)
    cmd_limpiar_Click
   ' objRS.Close
End Sub

Private Sub cmd_limpiar_Click()
    frame_ticket.Visible = False
    Dim i As Integer
    For i = 0 To 5
        Option1(i).Value = False
    Next i
    For i = 0 To 17
        Option2(i).Value = False
        Option2(i).Visible = False
    Next i
    txt_descripcion.Text = ""
End Sub

Private Sub cmd_sal_Click()
    Unload Me
End Sub

Private Sub cmd_Salir_Click()
    frame_ticket.Visible = False
    cmd_limpiar_Click
End Sub

Private Sub cmd_Ticket_Click()
    Dim var_sql, nom_est As String
    Dim Fecha As Date
    Dim numero_ticket, i As Integer
    Dim sw As Boolean
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    
    'Obtengo fechahora
    var_sql = "select now() as fecha"
    objRS.Open var_sql, conn
    Fecha = objRS("fecha")
    objRS.Close
            
    'Valido que se seelccione una opcion de soporte
    sw = False
    For i = 0 To 5
        If Option1(i).Value = True Then sw = True
    Next i
    If sw = False Then
        MsgBox "Debe seleccionar un tipo de soporte", vbInformation
        Exit Sub
    End If
    
    'Valido que se seleccione una opcion del tipo de soporte seleccionado
    sw = False
    For i = 0 To 17
        If Option2(i).Value = True Then sw = True
    Next i
    If sw = False Then
        MsgBox "Debe seleccionar una opcion del tipo de soporte", vbInformation
        Exit Sub
    End If
    
    'Valido que se llene es texto con la situacion
    If txt_descripcion.Text = "" Then
        MsgBox "Debe ingresar un comentario sobre lo que esta solicitando", vbInformation
        Exit Sub
    End If
        
    var_sql = "select max(numero_ticket) as nt from spte_ticket"
    objRS.Open var_sql, conn
    If Not IsNull(objRS("nt")) Then
        numero_ticket = objRS("nt")
    Else
        numero_ticket = 0
    End If
    objRS.Close
    var_sql = "select nom_est from establecimientos"
    objRS.Open var_sql, conn
        lbl_numero_ticket.Caption = (numero_ticket + 1)
        lbl_colegio.Caption = "- " & objRS("nom_est")
        lbl_user.Caption = "Usuario: " & Nom_com_usu_ses & "  Fecha: " & Fecha
    objRS.Close
    frame_ticket.Visible = True
End Sub





Private Sub Command1_Click()
    MsgBox Asc(Mid(txt_descripcion.Text, 5, 1))
End Sub

Private Sub Form_Load()
    Option1(0).Value = True
    carga_datos
End Sub

Private Sub carga_datos()
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    Dim var_sql As String
    var_sql = "select now() as fecha"
    objRS.Open var_sql, conn
    lbl_usuario = "Usuario:" & Nom_com_usu_ses & "   Fecha:" & Format(objRS("fecha"), "dd-mm-yyyy") & "   Hora:" & Format(objRS("fecha"), "h:mm:ss")
    objRS.Close
End Sub

Private Sub Option1_Click(Index As Integer)
    Dim var_sql As String
    Dim i, total As Integer
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    For i = 0 To 17
        Option2(i).Value = False
        Option2(i).Visible = False
    Next i
    'cmd_limpiar_Click
'    oculta_frame
    If Option1(0).Value = True Then
        Letra = "h"
        opt_detalles.Caption = "Hardware"
    End If
    If Option1(1).Value = True Then
        Letra = "s"
        opt_detalles.Caption = "Software"
    End If
    If Option1(2).Value = True Then
        Letra = "g"
        opt_detalles.Caption = "Gescol"
    End If
    If Option1(3).Value = True Then
        Letra = "i"
        opt_detalles.Caption = "Internet"
    End If
    If Option1(4).Value = True Then
        Letra = "e"
        opt_detalles.Caption = "Email"
    End If
    If Option1(5).Value = True Then
        Letra = "o"
        opt_detalles.Caption = "Otros"
    End If
    var_sql = "select * from spte_opcion where codigo_soporte = '" & Letra & "'"
    objRS.Open var_sql, conn
    If Not objRS.EOF Then
        objRS.MoveFirst
        For i = 0 To objRS.RecordCount - 1
            Option2(i).Visible = True
            Option2(i).Caption = objRS("descrip_detalle")
            'codigo_detalle = objRS("codigo_detalle")
            objRS.MoveNext
        Next i
    End If
End Sub

'Private Sub oculta_frame()
'    frame_hardware.Visible = False
'    frame_software.Visible = False
'    frame_gescol.Visible = False
'    frame_internet.Visible = False
'    frame_email.Visible = False
'    frame_otros.Visible = False
'End Sub

Public Sub generar_reporte(Folio As Long)
    Dim Fecha As Date
    Dim hora As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    Dim REC As ADODB.Recordset
    Set REC = New ADODB.Recordset
    Dim var_sql, tipo_soporte, Cadena As String
    'Impresión del ticket
    Dim i, Ind, linea As Integer
       
    var_sql = "select login_usuario,solicitud,date_format(fecha,'%d-%m-%Y') as fecha," _
            & "date_format(fecha,'%H:%i:%s') as hora,nombre_completo_usu as usuario," _
            & "numero_ticket , estado_actual, asignado, texto_solicitud" _
            & " from spte_solicitud ss,spte_ticket st,spte_detalle_solic sds,usuarios u" _
            & " Where ss.folio = st.folio_solicitud And ss.folio = sds.folio" _
            & " and ss.login_usuario = u.aut_nombre_usuario" _
            & " and ss.folio = " & Folio
    objRS.Open var_sql, conn
       
    '    Dim i, ind As Integer
'    For i = 0 To 17
'        If Option2(i).Value = True Then ind = i
'    Next i
    
    Select Case Mid(objRS("solicitud"), 1, 1)
    Case "h"
      tipo_soporte = "Hardware"
    Case "s"
      tipo_soporte = "Software"
    Case "g"
      tipo_soporte = "Gescol"
    Case "i"
      tipo_soporte = "Internet"
    Case "e"
      tipo_soporte = "Email"
    Case "o"
      tipo_soporte = "Otros"
    End Select
    
    var_sql = "select date_format(now(),'%H:%i:%s') as h"
    REC.Open var_sql, conn
    
    Call LimpiaFormulas(cr, 30)
    cr.ReportFileName = App.Path & "\Rpt\spte_ticket.rpt"
    cr.Formulas(1) = "numero_ticket = '" & objRS("numero_ticket") & "'"
    cr.Formulas(17) = "colegio = '" & "- COLEGIO BOSTON COLLEGE LA FARFANA" & "'"
    cr.Formulas(2) = "tipo_soporte = '" & tipo_soporte & "'"
    cr.Formulas(7) = "hora = '" & Format(REC("h"), "h:mm:ss") & "'"
    REC.Close
    
    'Asigno descripcion de soporte
    var_sql = "select descrip_detalle from spte_opcion" _
            & " where codigo_soporte = '" & Mid(objRS("solicitud"), 1, 1) & "'" _
            & " and codigo_detalle = '" & Mid(objRS("solicitud"), 2) & "'"
    REC.Open var_sql, conn
    cr.Formulas(3) = "desc_soporte = '" & REC("descrip_detalle") & "'"
    REC.Close
    
    'Asigno nombre de usuario al reporte
    cr.Formulas(8) = "nombre_usuario = '" & objRS("usuario") & "'"
    cr.Formulas(9) = "fecha_solicitud = '" & objRS("fecha") & "'"
    cr.Formulas(10) = "hora_solicitud = '" & objRS("hora") & "'"
    cr.Formulas(11) = "estado = '" & objRS("estado_actual") & "'"
    
    If objRS("asignado") = "NO" Then
        cr.Formulas(12) = "funcionario_soporte = '" & "Sin asignación actual, en trámite" & "'"
        'cr.Formulas(12) = "funcionario_soporte = '" & "Sin asignación actual, en trámite" & "'"
    Else
        var_sql = "SELECT nombre_personal as n" _
                & " FROM spte_asignacion sa,spte_personal sp" _
                & " Where ticket = " & objRS("numero_ticket") _
                & " and sa.rut_personal_soporte = sp.rut_personal"
        REC.Open var_sql, conn
        cr.Formulas(12) = "funcionario_soporte = '" & REC("n") & "'"
        REC.Close
    End If
        
    cr.Formulas(15) = "estado_general = '" & "Soporte Solicitado" & "'"
    cr.Formulas(16) = "detalle = '" & "Sin Observaciones" & "'"
    
     Cadena = txt_descripcion.Text
     Cadena = Replace(Cadena, vbCrLf, " ")
     cr.Formulas(4) = "situacion = '" & Cadena & "'"
        cr.Destination = crptToWindow
    cr.Action = 1

End Sub
