ACC2: Tips for Improving Combo and List Box Performance

Last reviewed: April 2, 1997
Article ID: Q112745
The information in this article applies to:
  • Microsoft Access version 2.0

SUMMARY

Moderate: Requires basic macro, coding, and interoperability skills.

This article lists several things you can do to improve the speed and performance of combo boxes and list boxes in your Microsoft Access applications.

MORE INFORMATION

To improve combo and list box performance, try these tips:

  • Include only fields from the record source that are absolutely necessary. Extra fields can decrease combo or list box performance.
  • Index the first field that is displayed in the combo box or list box.
  • Index any other fields used for criteria (such as when a combo box or list box is based on a criteria query).
  • In combo boxes, set the AutoExpand property to No if it is not needed.
  • Do not hide the combo box's bound column by setting its width to 0 in the ColumnWidth property.
  • Create a default value for combo boxes. Combo boxes try to match whatever is entered in them, so if there is no default value for the combo box, the combo box tries to match a null value when it is first opened. An example of a default value for a combo box is:

          =[combobox].ItemData(0)
    

    In the example above, [combobox] is the name of the combo box, and ItemData(0) refers to the first row of the combo box. The default value of the combo box becomes the value in its first row.

  • Use unbound subforms to display data when there is a large number of records.
  • The first non-hidden column in your combo box should have a Text data type, not a Numeric data type. In order to find a match in the list, Microsoft Access will have to convert the numeric value to text to do the character by character match. If the data type is Text, Microsoft Access does not have to do this conversion.


Additional query words: optimize
Keywords : FmsCmbo kbusage
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.