Dec 25, 2006 #1 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
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
Dec 26, 2006 #2 LtLeary IS-IT--Management Dec 24, 2006 16 US 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 Upvote 0 Downvote
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