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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rep.RecordSelectionFormula returns no one record.WHY?

Status
Not open for further replies.

vlad2

Programmer
Jan 9, 2002
56
0
0
US
I Need to get all customers within DateRange
it's vb app,i use DTPicker to get the dates.

Here is code:

mobjReport.RecordSelectionFormula = "{ERCHistory.CreateDate} in Date(" & DateFrom & ") to Date(" & DateTo & ")"

What's wrong with that?
What's really interesting that.. this code works for some reports, but it does not work for two other reports.If I run the report without RecordSelectionFormula then report gets popuilated with records.But if i use the RecordSelectionFormula than report is displayed with out records.

What may cause this problem?
THANKS FOR ANY Help.
 
I found the problem!

I sended the dates from another form. and i did not format the date values.

'mm/dd/yyyy'- incorrect

"yyyy,mm,dd" - correct

thanks you God
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top