Access - Create borders in a report


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.


Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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.
Dale FyeOwner, Developing Solutions LLCCommented:
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
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.