Problem reporting range of dates with CR6 and VB6 
Author Message
 Problem reporting range of dates with CR6 and VB6

Here's my code: (dates are in mm/dd/yy format)

    Report.RecordSelectionFormula = "{ado.Date} = in '" & strDate1 & "' to
'" &
    strDate2

    CRViewer1.ReportSource = Report
    CRViewer1.ViewReport

Everything seems fine until the report loads and I get the following message
in a vbokonly box:

*A number, currency amount, boolean or string is expected here.*

Any suggestions?

Thanks in advance



Thu, 15 Nov 2001 03:00:00 GMT  
 Problem reporting range of dates with CR6 and VB6
Tyr this, I got it from another message in this news group titled: Help
Needed, Urgent!

If IsDate(sValue) Then
    CheckFieldType = "Date(" & Format$(DateValue(sValue),"yyyy")  & "," & _
    Format$(DateValue(sValue), "mm") & "," & _
    Format$(DateValue(sValue), "dd") & ")"
else
  .....

Quote:

>Here's my code: (dates are in mm/dd/yy format)

>    Report.RecordSelectionFormula = "{ado.Date} = in '" & strDate1 & "' to
>'" &
>    strDate2

>    CRViewer1.ReportSource = Report
>    CRViewer1.ViewReport

>Everything seems fine until the report loads and I get the following
message
>in a vbokonly box:

>*A number, currency amount, boolean or string is expected here.*

>Any suggestions?

>Thanks in advance



Sat, 17 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. finding a range of dates using CR6 with VB6

2. Crystal Reports 8.5 date range parameter field - record selection that includes null date range

3. Problem printing report using CR6 with VB6 SP3

4. How to print records between two dates with CR6 and VB6

5. Date Range from VB6

6. A Date range test, VB6/Access

7. HELP!: CR6 Date Interpretation Problem

8. Report based on date range

9. Using variables for date ranges in a report

10. Date range parameter on a report

11. Including a Parameter Field (Date Range) in a report

12. Printing a date range parameter on the report header

 

 
Powered by phpBB® Forum Software