Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Margins

Status
Not open for further replies.

button71

Programmer
Nov 8, 2006
69
AU
Is there a routine around which can set the margin of a report at runtime to a standard say 10 10 5 5 ?

Thankyou

William
 
I'm not quite sure if this is what you are looking for but...

' Open the report in design View
DoCmd.OpenReport "test", acViewDesign
' Set your margins (default is pixels where 1" = 1440
' Pixels

Access.Reports("test").Printer.LeftMargin = 770
Access.Reports("test").Printer.TopMargin = 1440
Access.Reports("test").Printer.RightMargin = 770
Access.Reports("test").Printer.BottomMargin = 1440
' Open the report in NormalView
DoCmd.OpenReport "test", acViewNormal
' Close the report
DoCmd.Close

Note that if your controls are places outside these "new margins" they will "truncate" when you print.

Hope this helps.

Lt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top