Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/01/2005, 07:57
_Brian_
 
Fecha de Ingreso: octubre-2003
Ubicación: ***
Mensajes: 152
Antigüedad: 20 años, 6 meses
Puntos: 0
Pregunta consulta en Access

necesito hacer una consulta comparando un dato numerico. el numero a comparar se lo paso como parametro a una funcion que ejecuta la consulta, pero el numero tiene este formato 0.00000000000000E+00 y al ejecutar la consulta me da un error ... alguien se le ocurre algo para poder hacer esta consulta ¿?

'::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::.
Function GetConyuge(dboid) 'dboid numero con el formato raro ese

Dim rs As Recordset

sql_consulta = "SELECT Conyuge1.CONYUGE1, Conyuge1.TERNOMCOM, Conyuge1.TERDNINIF, Conyuge1.TERCARCON" & _
" FROM CONYUGE1 " & _
" WHERE (((Conyuge1.CONYUGE1)=" & dboid & ")); " & _
" union SELECT Conyuge2.CONYUGE2, Conyuge2.TERNOMCOM, Conyuge2.TERDNINIF, Conyuge2.TERCARCON " & _
" FROM CONYUGE2 WHERE (((Conyuge2.CONYUGE2)=" & dboid & "));"

Set rs = CurrentDb.OpenRecordset(sql_consulta)
MsgBox sql_consulta
If Not rs.EOF Then
MsgBox rs.Fields("TERNOMCOM") & " " & rs.Fields("TERDNINIF") & rs.Fields("TERCARCON")
Else
MsgBox "no se encontraron datos"

End If
rs.Close

End Function
'::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::