I want to change the caption in a label on a report depending on
which button I press on the switchboard. The following does not
work:
Reports![Signers]![LabelInHeader].Caption = "BSM Signers"
What version of Access?
In Access 2002 or later (I'm not sure about Access 2000):
DoCmd.OpenReport "Signers", acViewPreview, , , , , "BSM Signers"
Then code the Report Header Format event:
Me![LabelInHeader].Caption = Me.OpenArgs
If your version does not have the OpenArgs argument for OpenReport,
you can add an unbound text control to the Form.
Code the Click event of your command button:
Me![ControlName] = "BSM Signers"
DoCmd.OpenReport etc....
Code the Section's Format event:
Me![LabelInHeader].Caption = forms!SwitchboardName!ControlName