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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top