Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 20: Advanced Access Report Techniques


725


You might want to add other special characters to the control. For a complete display of the char-
acters available in the font you’ve chosen for the text-box control, run Charmap.exe, the
Windows Character Map application (see Figure 20.20). Be sure to select the font you’ve chosen
for the text-box control. The only constraint on the characters you use on an Access report is that
the font used in the text boxes on the report must contain the specified characters. Not all
Windows TrueType character sets include all the special characters, like bullets.

FIGURE 20.20

Charmap is a useful tool for exploring Windows font sets.


Charmap is quite easy to use. Select a font from the drop-down list at the top of the dialog box,
and the main area fills with the font’s default character set. Some character sets are incredibly large.
For example, the Arial Unicode MS font includes more than 53,000 different characters, including
traditional and simplified Chinese, Japanese Kanji, and Korean Hangul character sets.

Every character in a Windows font is accessible through the Chr() function. The page footer of
rptBullets includes a text box filled with characters specified by the Chr() function. For
example, the smiley face character is specified with Chr(74). Some of the characters displayed by
Charmap are identified only by their hexidecimal values. If the decimal value is not given, the hex-
idecimal value can be used with Chr() by using the CInt() function to convert the hex value to
integer: Chr(CInt(“&H00A9”)) displays the familiar copyright symbol (©) when used to set
the contents of a control set to the Arial font.

Adding emphasis at runtime
You might add a number of hidden controls to your reports to reduce the amount of clutter and
unnecessary information. You can hide and show controls based on the value of another control.
You hide a control, of course, by setting its Visible property to False (or No) at design time.
Free download pdf