Dynamically set caption of label ?

  • Thread starter Thread starter Rebecca
  • Start date Start date
R

Rebecca

I need to set the captions of several label controls for
my report.
Where is the best place to put this? I tried putting it in
the OnOpen event for the report but it does not recognise
the '.caption' property for the label control.
 
I need to set the captions of several
label controls for my report.
Where is the best place to put this?

Put it in the Print event for the Section where the Label resides.
I tried putting it in the OnOpen event
for the report but it does not recognise
the '.caption' property for the label control.

The Open event is too early in the process for setting Controls' properties.

Larry Linson
Microsoft Access MVP
 
Ok, I tried both the 'on pageheader format' and 'on print'
events and the caption property does not appear in the VBA
prompt.
This is a label, should I be using a Text Box?
Or, do I have the syntax wrong?
I'm using Me!controlname.caption =
 
I don't understand. For a label named lblA, you would code:

Me!lblA.Caption = "OtherLabel"

in the Print event for that section. It just worked for me. No, Caption
wasn't in the Intellisense list, but it worked just fine.
 
Back
Top