Results 1 to 4 of 4
  1. #1
    TRC_Jim is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Florida
    Posts
    2

    Form combo dropdown menu to display choices according to non-primary key field?


    I am assisting with an Access Db (2007) that was imported from 2000, and realize I am a beginner the more I learn about Access.

    In the Db, there are many tables and forms, but one issue that has arisen - which we haven't been able to resolve - is within some forms. 'I will try to explain as best I can.

    They are using a combo box that lists values based on the primary key that joins several other tables together. The problem is, the actual items they need (Column 2) are not in alpha order. For example, Column 1 on the table referenced by Combo box 3 is the primary key - a 2 letter code. The 2nd column is the actual item, the term we want the form field to display in alpha order (as the primary key abbreviations are a formal "code" that may not correspond with the actual item). We tried adding another field, simply 1-87, and then tried to have the form sort by that to no avail. Additionally, we only want Column 1 and 2 to display.

    If attaching screenshots would help, I'd be happy to do so. Thank you in advance.

    Jim

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The RowSource of the ComboBox can be a query that sorts on any column you want. Create that query and then set it as the RowSource of the cbo.

  3. #3
    TRC_Jim is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Florida
    Posts
    2
    Quote Originally Posted by RuralGuy View Post
    The RowSource of the ComboBox can be a query that sorts on any column you want. Create that query and then set it as the RowSource of the cbo.
    Thanks, Rural Guy! Worked like a charm. Queries are the way to go, apparently. Just have to remember to set that field as ascending in the design view of the query.

    Many thanks!

    Jim

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 08-10-2011, 01:48 AM
  2. Replies: 6
    Last Post: 06-13-2011, 12:14 PM
  3. Replies: 1
    Last Post: 05-25-2011, 08:37 AM
  4. Can I use dropdown menu selections in a sum?
    By REAPER_110 in forum Forms
    Replies: 1
    Last Post: 05-02-2011, 04:05 PM
  5. Query to Limit Combo Box Choices
    By jimrockford in forum Queries
    Replies: 2
    Last Post: 04-23-2011, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums