Setting Report Margins with Code

T

Tony

I'm looking for a simple way to allow my users to temporarily set the margins
of a report prior to printing. I thought I had it working by using this
code:

docmd. openreport, "ReportName", acViewPreview
ReportName.TopMargin = 5

But its not working now. Its not recognising the ReportName as an object.
Does anyone have a simple solution to this?
---Tony
 
Top