Automating Reports Title from Form

E

Edgar Thoemmes

Hi

How can I set the value of a heading on a report from VBA.

I have tried.

With Reports![rptDynamicTopSuppliers
..txtHeading.Value = strHeading
..txtSubHeading.Value = strSubHeading
End With

But neothing is displayed in the text boxes. Can anyone help?

Thanks
 
A

Allen Browne

You cannot push the value from the form onto the report, because the report
must have it at the time it formats that section.

You can get the report to read the value from the form. For example, set the
Control Source property of the txtHeading text box on the report to:
=[Forms].[Form1].[text1]
 
Top