Combo box drop-down:  left justified vs. right justified logic

Posted on 2005-05-05
Last Modified: 2012-08-14
When you click on a combo box that contains a valid .RowSource property, a drop-down appears.  Is there any logic for whether the drop-down is left-justified or right-justified to the combo box, and if so what is it?

I'm trying to create a combo box that is only .Width=.2, and have the drop-down extend left to match the width of a textbox there, and instead it is going right.

Right-justified meaning the right edge of the dropdown is aligned with the right edge of the control.
Left-justified meaning the left edge of the dropdown is aligned with the left edge of the control.

Question by:Jim Horn
    LVL 50

    Expert Comment

    by:Steve Bink
    The logic I've seen is numeric vs. text, and follows the same rules Excel does for default formatting.  

    Numeric = left-justified
    Text = right-justified (General)
    Anything not strictly numeric = text

    LVL 15

    Expert Comment

    I think you mean you want to control were the dropdown will be aligned and not the values in it...

    If so, you can't control that.  Normally the dropdown's left edge will be aligned with it's combobox left edge unless there isn't enough space on the screen.
    LVL 50

    Expert Comment

    by:Steve Bink
    DOH!  Yeah, I misunderstood what you were asking.  jmantha709 has it right, I think.  Have you played with putting the control next to the edge of the form/screen?
    LVL 65

    Author Comment

    by:Jim Horn
    I just figured it out, it's ComboBox.ScrollBarAlign property, which in addition to changing the scrollbar location also changes the alignment of the dropdown.

    Learn something new every day.

    I had a sized form, where my combo box was on the far right side, and the drop-down was going to the right, away from the form.

    Barring any objections, I'll ask for a PAQ/Refund on this one.
    LVL 26

    Expert Comment

    I've seen this happen when I've built my list/combo and supplied it's source in default font, and then changed the font size.
    Don't know if it helps...
    LVL 50

    Expert Comment

    by:Steve Bink
    ScrollBarAlign...I said that didn't I?  :)  PAQ/Refund, aye.

    Accepted Solution

    PAQ'd, 500 points refunded.
    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now