Hi all,
Is there a way to programatically 'fill in' a label or text box in a report?
In the following code (which I got from Spenny and modified slightly):
strDocName = "Status Actualis-UnitBatch"
DoCmd.OpenReport strDocName, acViewDesign
Set rpt = Reports(strDocName)
rpt.FilterOn = True
rpt.Filter = "Unit = '4500'"
DoCmd.Close acReport, strDocName, acSaveYes
DoCmd.OpenReport "Status Actualis-UnitBatch", acViewPreview
I would like to add code that would fill in a text box or label in the report with some text. I have tried:
(Text59 being the name of the unbound text box I created)
Text59 = "Denver"
Text59 = "= Denver"
Text59 = "= 'Denver'"
On most of these I get no error message, but the text I want does not appear in box.
Perhaps the way to go is a label. I have tried similar combinations of code for a label (using Label59), but nothing has worked.
Your help is greatly appreciated.
McLigs
Is there a way to programatically 'fill in' a label or text box in a report?
In the following code (which I got from Spenny and modified slightly):
strDocName = "Status Actualis-UnitBatch"
DoCmd.OpenReport strDocName, acViewDesign
Set rpt = Reports(strDocName)
rpt.FilterOn = True
rpt.Filter = "Unit = '4500'"
DoCmd.Close acReport, strDocName, acSaveYes
DoCmd.OpenReport "Status Actualis-UnitBatch", acViewPreview
I would like to add code that would fill in a text box or label in the report with some text. I have tried:
(Text59 being the name of the unbound text box I created)
Text59 = "Denver"
Text59 = "= Denver"
Text59 = "= 'Denver'"
On most of these I get no error message, but the text I want does not appear in box.
Perhaps the way to go is a label. I have tried similar combinations of code for a label (using Label59), but nothing has worked.
Your help is greatly appreciated.
McLigs