I need to pull the Value of a Label on a form to a Report. I tried putting
this on the command button of the form after the report opens but it doesn't
work, I assume that its a timing issue, and unlike a textbox there isn't a
control property to put a value in.
Reports!rptCheck!LblDiscount.Caption =
Forms!frmCheckPreview!LblDiscount.Caption
Thanks
DS
BruceM - 12 Jan 2007 14:12 GMT
Is the label caption created in a way that you cannot reproduce on the
report?
I have not tried what you are asking, but I assuming the form is still open
I expect you could set the label's caption in the Print event of the report
section (e.g. the Detail section's Click event if the label is in the Detail
section):
Me.lblDiscount.Caption = Forms!frmCheckPreview!LblDiscount.Caption.
>I need to pull the Value of a Label on a form to a Report. I tried putting
>this on the command button of the form after the report opens but it
[quoted text clipped - 6 lines]
> Thanks
> DS
DS - 12 Jan 2007 23:20 GMT
I made a Text Box with this in the control source.
=[Forms]![frmCheckPreview]![LblDiscount].[Caption]
This works.
The form is closed when the report prints.
Thanks
DS
> Is the label caption created in a way that you cannot reproduce on the
> report?
[quoted text clipped - 14 lines]
>> Thanks
>> DS
Larry Linson - 13 Jan 2007 01:58 GMT
>I made a Text Box with this in the control source.
> =[Forms]![frmCheckPreview]![LblDiscount].[Caption]
[quoted text clipped - 21 lines]
>>> Thanks
>>> DS
fredg - 12 Jan 2007 18:16 GMT
> I need to pull the Value of a Label on a form to a Report. I tried putting
> this on the command button of the form after the report opens but it doesn't
[quoted text clipped - 6 lines]
> Thanks
> DS
Work it from the Report end.
Code the Report's Report Header Format event:
Me.[lblDiscount].Caption = Forms!frmCheckPreview!LblDiscount.Caption
The form must be open when the report is run.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
DS - 12 Jan 2007 23:21 GMT
The form is closed when the report is run.
Thanks
DS
>> I need to pull the Value of a Label on a form to a Report. I tried
>> putting
[quoted text clipped - 16 lines]
>
> The form must be open when the report is run.
Klatuu - 12 Jan 2007 18:29 GMT
Change the label in the report to a text box.
Put your reference to the form's label in the Control Source of the text box:
=Forms!frmCheckPreview!LblDiscount.Caption

Signature
Dave Hargis, Microsoft Access MVP
> I need to pull the Value of a Label on a form to a Report. I tried putting
> this on the command button of the form after the report opens but it doesn't
[quoted text clipped - 6 lines]
> Thanks
> DS