I need to pass in name of a field to sqlite3 to process it.
But when I try to treat it I don't know how to do it so that it works for me.
' datefield = "[Created ▽]" x-----(This field name result is the problem)
' dateSQLite = "2023-10-01"
Public Function sum(resultados As Result, Optional datefield As String = "", Optional dateSQLite As String) As Float
Dim f As Float
While resultados.Available
If datefield = "" Then
f += resultados["Amount"]
Else If resultados[datefield] = dateSQLite Then ' This should work just fine. But, here it breaks because it doesn't recognize the field
f += resultados["Amount"]
Endif
resultados.MoveNext
Wend
Return f
End