Is it possible to sort records on a form by value in combo box?

Posted on 2011-05-06
Last Modified: 2012-05-11
I have a form with a record source as a table.  One of the controls on the form is a combo box whose record sorce is a different table.  I want the form to sort in the order of column 2 in the combo box.  Is this possible?
Question by:SueJStevens
    LVL 77

    Assisted Solution


    You would need to make that column available in the form's recordsource (by selecting the field explicitly)  and you can then sort on it.
    LVL 74

    Assisted Solution

    by:Jeffrey Coachman
    Is the sort order of this combobox constantly/dynamically changing?

    You can set the rowsource of the form to sort any field you want

    Author Comment

    it is not the combo box that needs to be sorted--it isn't changing and it it is a straight forward sort.  The combo box displays the name of companies.  The fields in the combo box are CoID, CoName, etc.  The available fields in the form's datasource include CoID but do not include CoName as that exists in a different table.  We want to sort the data on the form by CoName.

    The reason we have not included that column as part of the form's record sorce is because we need to be able to update the records in the table which isn't possible with a query containing a join.

    Peter57R & Boag2000:  Any recommendations on what to do from here?

    Accepted Solution

    Got it!  We ended up creating a view in SQL Server with Check Option so that the view is updatable but also contains the column for the company name from the 2nd table.  We then do not make that column visible to users but it can be used as a sort criteria on the form.  Thanks for allowing me to post this question as I worked through our options.

    Question:  Is there a way to assign points to the responders of this question even though I utilmately arrived at the solution on my own?

    Author Closing Comment

    arrived at solution on my own but want to give the community credit for helping.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    755 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

    24 Experts available now in Live!

    Get 1:1 Help Now