Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/10/2004, 06:11
Mi69
 
Fecha de Ingreso: septiembre-2004
Mensajes: 35
Antigüedad: 20 años, 7 meses
Puntos: 0
Error 94 En Tiempo De EjecuciÓn

hola a todos/as.

por favor, necesito ayuda con este código. si la consulta con encuentra registros, me aparece el error 94 en tiempo de ejecución. ya cambié el código varias veces, pero no puede solucionarlo...

gracias


datPrimaryRS.RecordSource = "Select Sum([Venta]) As Suma From MiTabla Where [Origen]='" & txtOrigen & "' AND [Destino]='" & txtDestino & "' AND [Venta]=" & txtVenta & " AND [Lugar]='" & txtLugar & "'"
datPrimaryRS.Refresh
If datPrimaryRS.Recordset.RecordCount > 0 Then
txtTotalVenta = datPrimaryRS.Recordset.Fields(0)
txtTotalVenta = Format(txtTotalVenta, "#,###,###,#0.00")
Else
txtTotalVenta = 0
txtTotalVenta = Format(txtTotalVenta, "#,###,###,#0.00")
End If

datPrimaryRS.RecordSource = "Select * From MiTabla Where [Origen]='" & txtOrigen & "' AND [Destino]='" & txtDestino & "' AND [Venta]=" & txtVenta & " AND [Lugar]='" & txtLugar & "'"
datPrimaryRS.Refresh
txtCantidadRegistros = datPrimaryRS.Recordset.RecordCount
grdDataGrid.Refresh
End Sub