Microsoft Access Tutorial: How To Create A Leading Dot List

Microsoft Access Tutorial: How To Create A Leading Dot List

If you wanted to generate a table of contents or a set of index pages, the format for this type of document tends to have leading dots connecting narratives with page numbers.

Using Microsoft Word or other word processors and DTP applications; generating these pages is a breeze. With Microsoft Access however, it simply doesn’t exist and to mimic such a document we need to be a little creative here. 

In this Microsoft Access tutorial, I’m going to create a report showing the company name, a contact name and the telephone number sitting (as right aligned) at the end of a dot leader line (see image below).

microsoft access tutorial string function

In fact, the telephone number may appear as right aligned but is in fact a separate control placed to the right of the first control which is a calculated expression concatenating company name, contact name and a special Access function called String.

Microsoft Access Tutorial: How To Create A Leading Dot List – The Steps

Start by creating a blank report or use the wizard or template based on the data source for your report.

In my simple example, I have a label which appears in the header section labelled as ‘Contact Telephone List’ and two text boxes in the main details section; one will be an expression and the other bound to a field for the telephone number.

The first text box control will contain an expression as follows:

=[Company Name] & “, ” & [Contact Name] & String(200,”.”)

The important element to this is the String function which contains two arguments; the value of how many repetitions to show and the second argument showing the literal character(s). Therefore, in my example I want to show the “.” dot character 200 times.

You can adjust the value to suit and I set my value higher than probably needed as the controls width will not be enough to show the end character.

As a precaution, make sure you also set this control’s properties of ‘Can Grow‘ and ‘Can Shrink‘ to both ‘No‘.

Add the second text box control to the right and right align its format.

There you have it! A simple dot leader report.

I hope you found this Microsoft Access tutorial helpful and perhaps if you have created something unusual in Access whether it be a form or report, I would very much like to hear from in the comments box below.

Leave a Reply

Your email address will not be published. Required fields are marked *