
www.Usenet.com
Group Index
Comp Thread Archive from Usenet.com
subscript out of range.
- __From__: Maureen Lola
- __Subject__: subscript out of range.
- __Date__: Mon, 24 Nov 2003 03:40:56 -0600
Hello everyone.
I have a problem here. Hope some of you can help me
out.
Sorry for cross posting, because I find that
there's more response from this NG, but yet I want to post it to crystal NG
also.
I'm trying to pass 2 parameters from VB6 to crystal
report.
The follow is my code:
I guess the problem should be with my Array. But
I'm not too sure as to how to edit it as I actually copied the code from some
websites...
Can someone pls explain to me.
+===================================================+
Set crptApp = New CRPEAuto.Application
Set
crptRpt = crptApp.OpenReport(App.Path & "\MyReport.rpt")
Set rptDB =
crptRpt.Database
Set rptTbls = rptDB.Tables
Set rptTbl =
rptTbls.Item(1)
rptTbl.SetLogOnInfo "dsn=MyDSN"
Set crptParaFDs = crptRpt.ParameterFields
Set crptParaFD = crptParaFDs.Item(1) <== Error
here.
crptParaFD.SetCurrentValue
CStr(dtCommFrmDate.Value)
Set crptParaFD =
crptParaFDs.Item(2)
crptParaFD.SetCurrentValue
CStr(dtCommToDate.Value)
crptRpt.Preview
Set crptParaFD = Nothing
Set crptParaFDs =
Nothing
Set crptRpt = Nothing
Set crptApp =
Nothing
- subscript out of range.,
Maureen Lola