Embedding pictures in your Access forms may create a nice effect, but it consumes a ton of resources. Here's a simple trick that lets you add a graphical touch without all that overhead: Use the Wingdings font.
You can insert a symbol or picture into a form or report, but embedded graphics consume a lot of resources. You can get a similar effect without embedding a file by using the Wingdings font. This alternative is easy to implement and produces satisfactory results most of the time. For instance, you might be surprised to learn that the phone icon in the following form is actually a combination of the Chr() function and the Wingdings font, not an embedded graphic.
To add the Wingding, do the following:
- Open the form in Design view and add a text box in the desired location.
- Enter =Chr(40) as the control's Control Source property.
- Set the following properties as follows:
View the form in Form view. If the graphic isn't completely visible, return to Design view and resize the text box, accordingly.
If you don't disable the control (by setting the Enabled property to No), users can select the text box. Depending on the effect you're after, you can combine the Back Color and other properties to change the appearance when selected. For instance, you might want the control's background color to turn red when selected. If you disable the control, users won't be able to select the text box, but Access will dim it.
This easy technique has potential:
- Back Style: Transparent
- Back Color: Enter the appropriate value to match the section's Back Color property.
- Special Effect: Flat
- Border Style: Transparent
- Font Size: Adjust as necessary; the example uses 20.
- Font Name: Wingdings
Now, you're probably wondering which values produce specific Wingdings. Alan Wood has just what you're looking for -- bookmark the page if you plan to use this technique. Use the appropriate Dec value in his chart as the Chr() function's value.
- You can use the control's Click event to execute some action. For instance, clicking the Phone graphic might dial the current number.
- You can use a bound text box to update the Chr() function's argument and allow the record to determine the graphic.