
VB Data Report and accessing controls at run-time
Quote:
> How do you access controls such as a label at run-time on VB's data
> report? I expected it to be the same as a VB form, but that doesn't
> seem to be the case. ex. DataReport.Label.Caption="Caption" doesn't
> work.
I've posted on this topic so you can try deja news for exact syntax, which
don't have handy here. The trick is that you must refer to the RptLabel
control in a roundabout way, via the Collections of which it is a member -
don't blame me, this is MS's poor development of the DataReport before
putting it into production. The syntax would be something like:
DataReport.Sections("ReportHeader").Controls.Item("Label3").Caption = "Hello
world"
...this is off top o'me head so see deja for my past posts which were taken
from code I had tested. Oh yeh, you also gotta know that setting label
Caption must be done before you Show the report; once report is vsible you
can't change its labels as you can with a form.
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"
((("What's so funny 'bout peace, love & understanding?" - Nick Lowe)))