Friends,

I tried this formula but the result is not correct.

VB Code:
  1. fdval = dpfrom.Value
  2. tdval = dpto.Value
  3.  
  4. With Report
  5.     .RecordSelectionFormula = "(cdate({admin.cfdate}) >= #" & fdval & "# and cdate({admin.ctdate}) <= #" & tdval & "#) " _
  6.     & "and ({admin.cpp} = 'CSOP')"
  7. End With

The problem is the "admin.cdate" is a text datatype in ms-access.
if i put cdate({admin.cdate}) then its taking mm/dd/yyyy format.
if i format the fdval as mm/dd/yyyy then im getting a wrong result.
but the admin.cdate is always stored as dd/mm/yyyy (but as a text datatype)
In this case, how can i pass the parameter to get the exact result.
I dont have any data between 1-apr-2006 to 7-may-2006.
But im getting one record in my result.
which is 04/03/2006 inside the ms-access.

Please treat this as urgent.

Thanks & Regards
Sathyguy