Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/10/2005, 05:32
Avatar de aldo1982
aldo1982
 
Fecha de Ingreso: noviembre-2004
Ubicación: Santa Fe (Argentina) Colon F.C
Mensajes: 1.362
Antigüedad: 20 años, 5 meses
Puntos: 6
Cita:
Iniciado por vbx3m
Si no puse el codigo porque no tenia mucho tiempo...

Este es el codigo que utilizo

Código:
Dim f As Variant
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

rs.CursorLocation = adUseServer
rs.CursorType = adOpenStatic
rs.LockType = adLockReadOnly
rs.Open "SELECT a.num_poliza, a.num_recibo, a.fecha_emision, a.ced_rif_tomador, a.ced_rif_asegurado,  a.ced_rif_beneficiario, a.cod_productor, a.lugar_pago, a.dir_cobro, a.tlf_cobro, a.marca, a.modelo, a.clase, a.serial_motor, a.serial_carroceria, a.placa, a.uso, a.tipo, a.color, a.puestos, a.ano, b.ced_rif_tomador,b.nom_tomador, b.caracter, b.tlf_tomador, b.dir_tomador, c.ced_rif_asegurado,c.nom_asegurado, c.tlf_asegurado, c.dir_asegurado, d.ced_rif_beneficiario, d.nom_beneficiario, d.dir_beneficiario, d.tlf_beneficiario, e.cod_productor, e.telefono, e.nombre FROM polizas a, tomadores b, asegurados c, beneficiarios d, promotores e WHERE (a.num_poliza LIKE  '" & Text1(0).text & "') AND (a.ced_rif_tomador= b.ced_rif_tomador) AND (a.ced_rif_asegurado=c.ced_rif_asegurado) AND (a.ced_rif_beneficiario=d.ced_rif_beneficiario) AND (a.cod_productor=e.cod_productor) GROUP BY num_poliza", conn
        
        If rs.EOF = True Then
            rs.Close
            Set rs = Nothing
           Exit Sub
        End If
    xCount = rs.RecordCount
        If Rx > rs.RecordCount - 1 Then
            Rx = 0
        End If
        If Rx < 0 Then
            Rx = rs.RecordCount - 1
        End If
    rs.Move Rx
    Text1(1).text = rs!num_recibo
    Text1(2).text = "ANUAL"
    Text1(3).text = "ANUAL"
    Text1(5).text = rs!fecha_emision
    Text1(4).text = DateValue(Text1(5).text) + 365
    Text1(8).text = rs!ced_rif_tomador
    Text1(6).text = rs!nom_tomador
    Text1(7).text = rs!caracter
    Text1(9).text = rs!tlf_tomador
    Text1(55).text = rs!dir_tomador
    Text1(12).text = rs!ced_rif_asegurado
    Text1(11).text = rs!nom_asegurado
    Text1(13).text = rs!dir_asegurado
    Text1(14).text = rs!tlf_asegurado
    Text1(16).text = rs!ced_rif_beneficiario
    Text1(15).text = rs!nom_beneficiario
    Text1(17).text = rs!dir_cobro
    Text1(18).text = rs!tlf_cobro
    Text1(20).text = rs!cod_productor
    Text1(19).text = rs!nombre
    Text1(21).text = rs!telefono
    Text1(22).text = rs!lugar_pago
    Text1(33).text = rs!marca
    Text1(31).text = rs!modelo
    Text1(32).text = rs!clase
    Text1(30).text = rs!serial_motor
    Text1(28).text = rs!serial_carroceria
    Text1(29).text = rs!placa
    Text1(27).text = rs!uso
    Text1(28).text = rs!tipo
    Text1(25).text = rs!Color
    Text1(24).text = rs!puestos
no te sirvio lo ke ye puse ?? prueba lo ke te puse ke te servirá..salu2
__________________
LA MUERTE ESTÁ TAN SEGURA DE VENCER QUE NOS DA TODA UNA VIDA DE VENTAJA