How to assign a value to a Textbox in Report PageHeader

  • Thread starter Thread starter Roshan Abbasi via AccessMonster.com
  • Start date Start date
R

Roshan Abbasi via AccessMonster.com

I want to assign a value, from a textbox in a form, to the textbox in the
PageHeader of a report. I have tried many variations of the following syntax,
but all failed:

Me.Section(acPageHeader)!txtSupplier= Forms!frmCriteria!cmbSuppliers

Seeking help.
 
Where are you putting that code?

If the supplier is part of the data source, you could simply include the
field.

If you must pull it from the form, then put an unbound text box in your
header and put the source as...
=Forms!frmCriteria!cmbSuppliers
 
Thanks Rick B for the reply. I have done exactly the same as suggest by you,
that is assigning this value on the Properties Sheet.
But, I want to put the code in the Code Module of the Report, e.g.,
Report_Open event?
I am curious about how to refer to an Unbound Control in the ReportHeader so
that we can assign it any value from another object like a form.
Please help me in clearing this concept.


Rick said:
Where are you putting that code?

If the supplier is part of the data source, you could simply include the
field.

If you must pull it from the form, then put an unbound text box in your
header and put the source as...
=Forms!frmCriteria!cmbSuppliers
I want to assign a value, from a textbox in a form, to the textbox in the
PageHeader of a report. I have tried many variations of the following syntax,
[quoted text clipped - 3 lines]
Seeking help.
 
I want to assign a value, from a textbox in a form, to the textbox in the
PageHeader of a report. I have tried many variations of the following syntax,
but all failed:

Me.Section(acPageHeader)!txtSupplier= Forms!frmCriteria!cmbSuppliers

Seeking help.

1) Place the code in the Report's Report Header Format event.

Me![txtSupplier] = Forms!frmCriteria!cmbSuppliers

2) the form must still be open when the report is run.
 
Back
Top