Recordset

A

ALBERTO

hi



I've got an excel program witch work against sql database
I fill cells on excel and they goes to sql

sudenly it dowsn't work and shows me the next error

The kind of data defined by the user is not defined

or something like this

sorry about my english


Function Filtrar(Dato As Recordset) As Variant

If Dato.EOF And Dato.BOF Then
Filtrar = 0
Else
If IsNull(Dato.Fields(0).Value) Then
If Dato.Fields(0).Type = 10 Then
Filtrar = ""
Else
Filtrar = 0
End If
Else
If Dato.Fields(0).Type = 10 Then
Filtrar = CStr(Dato.Fields(0).Value)
Else
Filtrar = CDbl(Dato.Fields(0).Value)
End If
End If
End If
End Function


Thanks
 
Top