How to address a control in report design

This is a question about object hierarchy and syntax, which I have not quite succeeded in resolving.

I have a report, in the header of which I wish to insert the search criterion according to which it has been generated. I have created for this a label field named ‘Criterion’ in the page header area of the report. I have discovered how to open the report (‘oRept’) in design mode, but not how to address (and therefore modify) this label.

When I edit the report and open the report navigator, I see the hierarchy

Report
    Page Header
        Criterion
            Label

But I am at a loss how to address this in the relevant macro. I had imagined something like

oSec = oRept."Page Header"
oField = oSec."Criterion"
oField.label = "...."

This doesn’t work; please help (if I have explained sufficiently clearly)!

Hello,

This is a duplicate of this post → How to address a control in a report.

You accepted that answer originally. Please continue the conversation there as I don’t understand where your problem is. Gave you a sample with code and comments in the code.

Oh dear, how embarrassing! Thank you for your patience. Curiously, I had no recollection of this previous enquiry, and though I evidently responded positively, I cannot find that I made use of it. However, it has solved the current problem. I would suggest deleting this thread, but for the fact that my new enquiry along the same lines did not lead me to the previous one. Maybe this will just broaden the links and help someone else to discover what they want.