R
Roger Withnell
In summary, I am opening a report with a sub in a form and trying to put
information from the form into the report.
I have built a public function in a module of the
report and call that function from the form sub. The simple test sub in the
form is:
DoCmd.OpenReport "Analysis report", acViewPreview
Reports![Analysis Report].SetAnalysisReport
The simple test function is:
Public Function SetAnalysisReport() As Variant
MsgBox (Me!Label5.Caption) 'Caption = Hello
Me!Label5.Caption = "Goodbye"
MsgBox (Me!Label5.Caption) 'Caption = Goodbye
End Function
The caption is changed but 'Hello' is still displayed on the report.
Many thanks in anticipation for your advice.
information from the form into the report.
I have built a public function in a module of the
report and call that function from the form sub. The simple test sub in the
form is:
DoCmd.OpenReport "Analysis report", acViewPreview
Reports![Analysis Report].SetAnalysisReport
The simple test function is:
Public Function SetAnalysisReport() As Variant
MsgBox (Me!Label5.Caption) 'Caption = Hello
Me!Label5.Caption = "Goodbye"
MsgBox (Me!Label5.Caption) 'Caption = Goodbye
End Function
The caption is changed but 'Hello' is still displayed on the report.
Many thanks in anticipation for your advice.