MS-Access / Getting Started

Using bitmaps on forms and reports

Bitmaps on forms and reports make an application look attractive and can also help convey the purpose of the form or report (as in a wizard). However, graphics are always resource-intensive, so you should use the fewest possible number of graphic objects on your forms and reports. This helps to minimize form and report load time, increase print speed, and reduce the resources used by your application.

Often you'll display pictures that a user never changes and that are not bound to a database. Examples of such pictures include your company logo on a switchboard or static images in a wizard. When you want to display images like these, you have two choices:

  • Use an Image control. If the image never changes, use an Image control. Image controls use fewer resources and display faster.
  • Use an Unbound Object Frame. If you need the image to be a linked or embedded OLE object that you can edit, use an Unbound Object Frame.

Tip: If you have an image in an Unbound Object Frame that you no longer need to edit, you can convert the Unbound Object Frame to an Image control by right-clicking the control and choosing Change To → Image from the pop-up menu.

Tip: When you have forms that contain unbound OLE objects, close the forms when they aren't in use to free up resources. Also, avoid using bitmaps with many colors - they take considerably more resources and are slower to paint than bitmaps of the same size with fewer colors.

Note: If you need to display an unbound OLE object but don't want the user to be able to activate it, set its Enabled property to False.

Speeding up list boxes and combo boxes

It's important to pay attention to list boxes and combo boxes when optimizing your application. You can take a number of steps to make your combo boxes and list boxes run faster:

  • When using multipage or tabbed forms containing list boxes or combo boxes on more than one page, don't set the RowSource of the list boxes or combo boxes until the actual page containing the control is displayed.
  • Index the first field displayed in a list box or combo box. This enables Access to find entries that match text entered by the user much faster.
  • Although it's not always practical, try to refrain from hiding a combo box's Bound column. Hiding the Bound column causes the control's searching features to slow down.
  • If you don't need the search capabilities of AutoExpand, set the AutoExpand property of a combo box to No. Access is then relieved of constantly searching the list for entries matching text entered in the text portion of the combo box.
  • When possible, make the first nonhidden column in a combo or list box a text data type, and not a numeric one. To find a match in the list of a combo box or list box, Access must convert a numeric value to text to do the character-by-character match. If the data type is text, Access can skip the conversion step.
  • Often overlooked is the performance gain achieved by using saved queries for RecordSource and RowSource properties of list boxes and combo boxes. A saved query gives much better performance than an SQL SELECT statement because an SQL query is optimized on the fly.
[Previous] [Contents] [Next]