Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP HELP HELP!!!

Status
Not open for further replies.

Maximus37

Technical User
Dec 7, 2002
21
US
I keep on gettin this error:

Run-time Error 20515.

Error in Formula <Record_Selction>.
'{References.rDATE} >= 11/1/2002 and {References.rDATE} <= 11/26/2002 and {References.Cname} = 'THE POMEROY COLLECTION, LTD&quot;
A date is required here.

This is the code I'm using within a command button, all variables are declared; and even used the DATE(&quot; & mFECHA# & &quot;) instead.


If Option3.Value = True Then
mFECHA1 = DTPicker1.Value
mFECHA2 = DTPicker2.Value
mCLTE = dbcMedium.Text
With CrystalReport1
mselection = &quot;{References.rDATE} >= &quot; & CDate(mFECHA1) & &quot; and {References.rDATE} <= &quot; & CDate(mFECHA2) & &quot; and {References.Cname} = '&quot; & mCLTE & &quot;'&quot;
.SelectionFormula = mselection
.ReportTitle = _
&quot;Referencias Por Consignatario &quot; & &quot; de &quot; & _
DTPicker1.Value & &quot; a &quot; & DTPicker2.Value
Call RepWindow
.Action = 1
End With


and if i change the syntax it displays all the records instead of just the requested.

Would someone help me find what the mistake I'm doing here?

I'd really appreciate it.

Thanx!
Max35
 
Hi Max35,
You might try formatting the date as &quot;yyyy-mm-dd 00:00:00.000&quot;. I've seen this error before but can't remember more than it was regarding the way we passed the dates to Crystal.
Jacque
Hope it helps or at least gets you closer towards a solution.[idea]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top