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

Trouble using value of field in VB6 report to set label caption

Status
Not open for further replies.

EddyLLC

Technical User
Mar 15, 2005
304
0
0
US
As an absolute beginner with reports in VB6 I have a Data Environment pulling from an Access2007 database. I also have a date report that prints fine but I'm trying to place a caption into a label based upon the value of a text field in the detail section. My problem is I don't know when to do it, I'm trying in DataReport_Initialize event and I don't know how to reference the text field. I've tried

ReportName.Sections.Item(3).Controls("FieldName")

but I receive an error "Object doesnt support this method. Any guidance is appreciated.
 
I've found a solution if not the answer to my issue. I referenced the DataEnvironment instead of the DataReport to find the value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top