Access - Create borders in a report

Hi

I have been asked to create borders in an Access report that is for in an invoice similar to that shown in the image below.
I am just looking for some suggestions on the best way to do this in Access.

Thanks

1
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Dale FyeCommented:
The only way I've done this is to create the horizontal lines in the group header/footer and page or report footers.  Then add vertical lines as appropriate to the detail and other sections.  Finally, to get the total number of records to display in the detail section you might do something like:

SELECT Field1, Field2, Field3 FROM yourReportQuery
UNION ALL
SELECT NULL as Field1, Null as Field2, NULL as Field3
FROM tblNumbers WHERE lngNumber < (40 - DCOUNT("*", "yourReportQuery"))

Open in new window

This implies you have a tally table (tblNumbers) with a single field (lngNumber) and maybe 100 records. and 40 is the number of records needed to make the report the size you want.
0
 
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
If access 2010 or newer, the easiest way will be using the grid control, and specifying grid lines.

The only potential issue is that I am not sure it will work so well with the whitespace you have in your report, between the summary line and the footer. Alternatively, the report has a "Line" method, you can use from the format event, to draw lines. It is rather complicated, and requires you do work alot on the coordinates of controls.  I don't have an example handy, but if you want to go that route, perhaps I can find an old project.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Hi Anders,

the easiest way will be using the grid control, and specifying grid lines.
What grid control are you referring to? I haven't seen any new controls in Access, but may have missed it.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much. Horizontal lines was a great way to handle this. Access clearly doesn't format like Excel so that was close enoough
0
 
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
@Scott: Sorry, I meant layout grid, not grid control. Here is an example using the layout grid, and grid lines to "border" up the report. I have not found a way to make the vertical lines between the last detail, and the summary.
Gridline-Demo.zip
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.