Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/09/2008, 19:16
DMatias
 
Fecha de Ingreso: septiembre-2008
Mensajes: 5
Antigüedad: 15 años, 8 meses
Puntos: 0
Pregunta Ayuda. Error '13' No coinciden los tipos.

Buenas a todos.
Mi idea es buscar un registro con usando como criterio 2 campos, para eso uso rs.find.
Este es el codigo que genera el error:
rs2.Find "cuit= '" & cuit.Caption & "'" And "PEesquema= '" & Pesq.Value & "'", 1


Capaz tengo un error de sintaxis.....Bueno, ustedes sabran.

Esto por las dudas.

Codigo completo:
Private Sub MODI_Click()
Dim Pesq2, palta2, ptr2, ss2, pb2 As Byte
Dim x As Variant
Pesq2 = Pesq.Value
palt2 = palta.Value
ptr2 = ptr.Value
ss2 = ss.Value
pb2 = pb.Value
Do Until rs2.EOF
If Pesq2 = 1 Then
rs2.Find "cuit= '" & cuit.Caption & "'" And "PEesquema= '" & Pesq.Value & "'", 1
If palta.Value = True Then
rs2.Find "CUIT= '" & cuit.Caption & "'" And "PEalta=" & palta2, 1
If ptr.Value = True Then
rs2.Find "CUIT= '" & cuit.Caption & "'" And "PEtr=" & ptr2, 1
If ss.Value = True Then
rs2.Find "CUIT= '" & cuit.Caption & "'" And "sinsuscri=" & ss2, 1
If pb.Value = True Then
rs2.Find "CUIT= '" & cuit.Caption & "'" And "PEbaja=" & pb2, 1
End If
End If
End If
End If
End If
If rs3.BOF = False And rs3.EOF = False Then
x = rs2.Bookmark
End If
Loop
rs2.Bookmark = x
bibli.Enabled = True
caja.Enabled = True
leg.Enabled = True
palta.Enabled = True
ptr.Enabled = True
ss.Enabled = True
pb.Enabled = True
apro.Enabled = True
rech.Enabled = True
Obser.Enabled = True
Pesq.Enabled = True
End Sub