• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Printers > 5.3. Programmatically Change Margin and Column Settings for Repor...

5.3. Programmatically Change Margin and Column Settings for Reports

Problem

You’d like to give your applications’ users some control over report layout, especially in designating column and margin settings. You could just let them loose in report design mode, but you’d like to maintain a little control over their actions. Is there some way to modify these layout settings from VBA?

Solution

Starting with Access 2002, each form and report object includes a Printer property. Retrieving this property gets you an object with many properties, several of which deal with margin and column settings for reports.

You can use properties of a report’s Printer object to retrieve and set layout properties. You’ll find properties representing the left, top, bottom, and right margins; the number of columns; and the size, spacing, and item order of the columns. In addition, the Printer object contains the Data Only option in the File Page Setup dialog. This solution demonstrates how to use the print layout properties provided by the Printer object.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint