I need to know how to make queries with date ranges,using crystal reports selection formula
This is a part of my code:
***************************
If Val(txtdesde) <> 0 Then
consulta = consulta & " and {pasesbancos.fecha}>= '" & txtdesde & "'"
End If
If Val(txthastafech) <> 0 Then
consulta = consulta & " and {pasesbancos.fecha}<= '" & txthastafech & "'"
End If
CrystalReport3.SelectionFormula = consulta
CrystalReport3.Action = 1
***************************
"pasesbanco" is a table's name
"fecha" is a field of this table
"consulta" is a string
thank you
This is a part of my code:
***************************
If Val(txtdesde) <> 0 Then
consulta = consulta & " and {pasesbancos.fecha}>= '" & txtdesde & "'"
End If
If Val(txthastafech) <> 0 Then
consulta = consulta & " and {pasesbancos.fecha}<= '" & txthastafech & "'"
End If
CrystalReport3.SelectionFormula = consulta
CrystalReport3.Action = 1
***************************
"pasesbanco" is a table's name
"fecha" is a field of this table
"consulta" is a string
thank you