DataReport

PendulumMan
10-31-2000, 06:34 PM
I am trying to create a report in VB6 - and I need to be able to change the the text box's datafield during runtime, dependant on the query. Can I do this or am I wasting my time.

dusteater
11-01-2000, 12:07 AM
Yes, you can!! Just double click the data report and then the code form will come up. You generate your query just like any other form. The only thing is that text boxes and Labels in each section have to be identified by Section and name...Like this:
Sections("PageHeader").Controls("lblLoc").Caption = rsLocations.Fields("Location")
Good Luck!

PendulumMan
11-08-2000, 01:14 PM
That was right on - thank you

NVRGVUP
11-29-2000, 02:17 PM
I posted the following question on the VB forum yesterday and have not yet received any replies (I was looking in the wrong forum for your earlier suggestion): Can you help me out? Thanks
Several weeks ago I found code on this site on how to edit a caption. I used it to
concatenate the following text field and string (I am using VB6's date report designer
and data environment):

Sections("Rec_Yr_Grouping_Header").Controls("lblCountyCo").Caption =
RptRS!countyname & " COUNTY"

However, I can't get the syntax right to be able to do the same with text boxes, which
the earlier posted message alluded to. Also, it seems to me there should be a text
property on the textbox object, but I don't see one. Has anyone else figured this out?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum