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

between dates parameter and formula help

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
I have a 8.5 report in my VB app. I need to have it list only those records that have a dateclosed but not paid between the dates the user inputs on a vb form.

Here is what I have in the form that contains the viewer for the report.

Private Sub Form_Load()
Me.WindowState = vbMaximized
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
Report.ParameterFields(1).AddCurrentValue (frmOutstandingInvoices.DataCombo1.Text)
Report.ParameterFields(startdate).AddCurrentValue (frmOutstandingInvoices.Text2.Text)
Report.ParameterFields(enddate).AddCurrentValue (frmOutstandingInvoices.Text3.Text)
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
Set Report = Nothing
End Sub

The report works fine for showing the client that has been invoiced but hasn't paid, but I added the startdate and enddate parameterfields to the report and as shown above am trying to have those parameters used in the report when I run this I get this error-- subscript out of range. If I take them out of the form load that has the viewer then of course the report prompts for the startdate and enddate and then will show those dates on the report. I still need to have some kinda formula so the report only lists between those dates.

So I need help with why I can't insert the parameters in the viewer form and have that part work and then help for doing the formula part.

Thanks for any and all help
 
ok I have the formula part working in the report so all I need help with is why I get an error when I try to implement the startdate and enddate using textboxes as shown above.

Thanks for any help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top