Hi guys! This is my first time to use a recordselectionformula on Crystal Reports 10. I get this error that the date-time is required and it points me to this code:
VB Code:
AnAccountReport.RecordSelectionFormula = "{Account_Code.Account_Code} >= '" & Trim(Text1.Text) & "' and" _ & "{Account_Code.Account_Code} <= '" & Trim(Text2.Text) & "' and " _ & "{GL_Table.Date} >= '" & Format(DTPicker1.Value, "MM/dd/yyyy hh:mm:ss") & "' and " _ & "{GL_Table.Date} <= '" & Format(DTPicker2.Value, "MM/dd/yyyy hh:mm:ss") & "' and " _ & "{GL_Table.Date} >= DateTime (2004, 08, 1,00, 00, 00) " _ & "and " _ & "if {GL_Table.Date} = '" & Format(DTPicker1.Value, "MM/dd/yyyy hh:mm:ss") & "' then " _ & "{GL_Table.Entry_Type} <> 'BB' " _ & "Else " _ & "{GL_Table.Entry_Type} <> ''"
Is there something wrong?




Reply With Quote