Why isn't my text box/label populating on the report

  • Thread starter Thread starter Chris Freeman
  • Start date Start date
C

Chris Freeman

i have a form that opens a report which is filtered. this part works just
fine. But I tried to take it to the next level, and customize the header
based on report purpose. So I adjusted the code to the form that is opening
the report:

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Reports!rpt_check_Reissue.Text62.Value = "Void Export Checks"

On first run, this worked well, the word displayed in the header text box.
As I closed the report, some message box displayed about the report you're
closing has been changed by another user... yeah yeah whatever and I saved
and closed the report.

Now I open the report, and the text box does not pickup the title. I tried
changing it to a label: Reports!rpt_check_Reissue.label13.Caption = "Void
Export Checks" and still nothing. The code doesn't generate an error, and the
report opens properly, but it doesn't display the value from the code.

Thanks in Advance
 
Hi Chris
Change the text box on the report to a label. Use the report open event to
enter the caption on the label. You will need to have some criteria on the
form. Suppose you have a form called frmSelection and a text box where the
type of report is selected called txtTypeOfReport. You could use:

Me.lblHeader = Forms!frmSelection.txtTypeOfReport
 
Back
Top