Hello All,

I am using CR9 & Access database.

Now I want to give record selection formula for perticular report in date range manner through VB code.

Its working fine for other date ranges but if I put date range from system date to system date then its not showing me any records rather I am getting records from query.

I have following ways to get preview of report:

VB Code:
  1. 1) oReport.RecordSelectionFormula = "{SPDelhiWise.RegDate} >= date(" & Format(fromdate, "yyyy,mm,dd") & ") and {SPDelhiWise.RegDate} <= date(" & Format(todate, "yyyy,mm,dd") & ")"
  2.  
  3. OR
  4.  
  5. 2) oReport.RecordSelectionFormula = "{SPDelhiWise.RegDate} > CDate(#" & fromdate & "#) AND {SPDelhiWise.RegDate} < Cdate (#" & todate & "#)"

now how should I handle it for range of same date?