Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/08/2012, 08:29
andresorland
 
Fecha de Ingreso: agosto-2012
Ubicación: Bogota Colombia
Mensajes: 4
Antigüedad: 11 años, 9 meses
Puntos: 0
Respuesta: error en Recordset

Hola

creo que el error era en armar la consulta en el mismo recordset,

Lo soluione con un string pra el query ... pego el codigo


Cita:

Function TraerParametro(ByVal Ipara As String) As String

Dim db As Database
Dim rs As Recordset
Dim sSql As String


sSql = "SELECT Parametros.Entidad, Parametros.Parametro, Parametros.TxtParametro FROM Parametros WHERE (((Parametros.Entidad)='" & Nit() & "') AND ((Parametros.Parametro)='" & Ipara & "'))"
Set db = CurrentDb
Set rs = CurrentDb.OpenRecordset(sSql)


If Not rs.EOF Then
TraerParametro = rs!txtparametro
Else
TraerParametro = Null
End If
End Function



Gracias.