|
-
Feb 10th, 2003, 05:46 PM
#1
Thread Starter
New Member
Subscript out of range error
I have a data report that is not connected to a datasource, etc. until runtime. On this report I am using text fields which I try to bind at run time. I keep getting a "Run time error '9': Subscript out of range" error on the lines referencing the text fields. I have verified my section number and spelling. Any ideas on what is causing this error? Here is my code:
Set drServCostAcctRpt.DataSource = DE
drServCostAcctRpt.DataMember = "ServiceCostAnalysis"
'set fields on report
drServCostAcctRpt.Sections(1).Controls.Item("txtService").DataField = "Service"
drServCostAcctRpt.Sections(1).Controls.Item("txtService").DataMember = "ServiceCostAnalysis"
drServCostAcctRpt.Sections(1).Controls.Item("txtWCost").DataField = "TotalCost"
drServCostAcctRpt.Sections(1).Controls.Item("txtWCost").DataMember = "ServiceCostAnalysis"
Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|