Reports
center on page
- determine page size, such as letter (8.5“ x 11”)
- open the report in design mode, and go to File → Page Setup
- configure the desired page margins, and close Page Setup
- set the width property of the report to be .01 less than the difference of your page size and margin (setting the width to the exact number doesn't work because Access adds a small amount that pushes your report beyond the margin boundary)
common report control sources
- =Now()
- the current date/time; typically used in a page footer, such as Label:“Printed:” Textbox:“=Now()”
- =“Page ” & [Page] & “ of ” & [Pages]
- example of a mixture of static and dynamic text; this is typically used in a page footer
- =sum([someField])
- calculate the sum of all totals in someField; typically used in a footer section
- =Left([someField],2)
- show only a maximum of the two left characters of someField (see Text Functions for many more)
- =[Forms]![frmSomeForm]![cboSomeCombobox].column(1)
- example of pulling data from a form control to obtain text for use in a report title
maximize and center zoom
DoCmd.OpenReport "reportName", acViewPreview DoCmd.Maximize Reports("reportName").ZoomControl = 0