PRA: Multiple-Column List Box Has No Horizontal Scroll Bar

    Article ID: Q120906
    Creation Date: 21-SEP-1994
    Revision Date: 19-SEP-1996

    The information in this article applies to:

    • Microsoft Access version 2.0

    SYMPTOMS

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

    When you place a multiple-column list box on a form so that some of the columns are not visible, the horizontal scroll bar does not appear.

    CAUSE

    This problem can occur when the size of the list box matches the width of the columns, and the number of rows does not require a vertical scroll bar. The problem occurs because an internal Microsoft Windows message that checks to see if a horizontal scroll bar is required arrives before the list box is filled. Since the message arrives before the list box is filled, Microsoft Access does not realize the list box requires a horizontal scroll bar.

    RESOLUTION

    A workaround for this problem is to set the height of the list box using Access Basic code in the OnLoad property's event procedure to force both a vertical and a horizontal scroll bar to be drawn. Once the scroll bars are drawn, set the list box's height back to its normal value. When the list box returns to its normal height, the vertical scroll bar will disappear if it is not needed.

    STATUS

    Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This behavior no longer occurs in Microsoft Access for Windows 95 version 7.0.

    MORE INFORMATION

    Steps to Reproduce Problem

    1. Start Microsoft Access and open any database.
    2. Create a blank, new form.
    3. Add a list box with the following properties to the form:

            RowSourceType: Value List
            RowSource: 1;2;3;4;5;6;7;8
            ColumnCount: 4
            ColumnWidths: 0;1;1;1
      
    4. Save and then close the form.
    5. Open the form in Form view. Note that the list box has no horizontal scroll bar.

    REFERENCES

    For more information about list boxes, search for "list box: control," and then "List Box Control" using the Microsoft Access Help menu.


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.
©1997 Microsoft Corporation. All rights reserved. Legal Notices.

Additional reference words: 2.00 scrollbar
KBCategory: kbui
KBSubcategory: UiProb