Create Better MS Access Reports
Report Builder for Microsoft Access helps you create dynamic, professional-looking
reports fast! The easy-to-understand wizard helps you with complex
tasks like calculated fields, adding subreports, customizing styles,
as well as grouping and sorting. Download a free trial today!
When creating reports in Microsoft Access there are certain formatting options that can be applied whilst in design view of the database report. You may wish to add Lines or Rectangles to frame specific areas of the report to ensure that these stand out amongst the other information.
There are also options available to create Borders around the entire page of an Access report, and using the simple code below will allow you to do this:
Since you want to modify the page, it makes sense to put this code in the Report_Page() event.
Private Sub Report_Page() On Error Resume Next 'Set Thickness and Border Style 'Larger Number creates Thicker Line Me.DrawWidth = 1 'Values 0 to 6 = Solid Line to Invisible Me.DrawStyle = 2 'Object.Line (x1, y1) - (x2,y2), color, [Box=B] Me.Line (0, 0)-(Me.ScaleWidth, Me.ScaleHeight), vbRed, B End Sub
The code above creates the following effect:
Displaying a Border around your Microsoft Access Report