Part III: More-Advanced Access Techniques
724
The bullet is added by exploiting a Windows feature. Position the text insertion character in the
RecordSource property for the CompanyName field, hold down the Alt key, and type 0149.
Windows inserts the standard Windows bullet character, which you see in the property sheet.
Looking at Figure 20.18, you can see that the bullet character is inserted correctly into the text box
on the report. The expression you use in the ControlSource property is the following:
= “· “ & [CompanyName]
where the bullet is inserted by the Alt+0149 trick.
You can produce the same effect by using the following expression in the text box:
= Chr(149) & “ “ & [CompanyName]
This expression concatenates the bullet character — returned by Chr(149) — with the data in
the CompanyName field.
Note
This particular trick only works if the character set (such as Arial) assigned to the control (label or text box)
includes a bullet character as the 149th ASCII character. Not all fonts accessible by Access applications
include a bullet character, but popular typefaces such as Arial do tend to include this character.
The report now appears as shown in Figure 20.19. You might want to add a few extra spaces after
the bullet to pad the white space between the bullet and the text. Because the bullet character and
CompanyName field have been concatenated together in the text box, they’ll be displayed in the
same typeface. Also, adding the bullet character to the text box containing the company name
guarantees that the spacing between the bullet and first character of the company name will be
consistent in every record. When using proportionally spaced fonts such as Arial, it can sometimes
be difficult to get precise alignment between report elements. Concatenating data in a text box
eliminates spacing problems introduced by proportionally spaced characters. Note, though, that if
the amount of text in the text box exceeds a single row, subsequent rows will not be indented.
FIGURE 20.19
Use a Windows feature to insert the bullet in front of the CompanyName field.