I have had much better coding and easier reports by doing the following.
Instead of passing the recordselectionformula I simply insert the begDate and endDate as parameters in the report. (not using a range and insure that both parameters of of type DATE.
Write the record selection into crystal using the IN({?begDate} to {?endDate}) as part of the selection criteria.
In vb pass the parameters as follows.
.ParameterFields(1).AddCurrentValue (CDate(Format(frmReports.txtLogBegDt.Text, "MM/DD/YYYY")))
.ParameterFields(2).AddCurrentValue (CDate(Format(frmReports.txtLogEndDt.Text, "MM/DD/YYYY")))
This gets past the recordselectionformula having to have the Date(YYYY,MM,DD) built into it.
Andy Baldwin
"Testing is the most overlooked programming language on the books!