[Webinar] Learn how to a build a cloud-first strategyRegister Now


Combo question

Posted on 2014-08-30
Medium Priority
Last Modified: 2014-08-30
I want a form’s combobox with its own table and query  to have its bound column to an ID number  from it’s query but display and store a description in its  control source which is one of the fields in the forms underlying table

Is that possible?
Question by:DatabaseDek
  • 2
LVL 49

Accepted Solution

Dale Fye earned 2000 total points
ID: 40294359
Yes, and generally preferable.

1.  Create your lookup table like:

MyID - Autonumber
MyDesc - Text

Note: Change  "MyID" to something meaningful, but don't just use ID because after you have done this in several tables, it will get confusing

2.  In your main table, add the MyID column to store the key to your lookup table.  DO NOT use the lookup feature in the table design, this will only confuse you later.

3.  In your main form, add a combo box that is bound to the MyID column.  Set the following properties of the combo box:
     a.  RowSource = SELECT MyID, MyDesc FROM yourLookupTableName
Note: you might want to add an ORDER BY clause to that to sort the results by MyDesc
     b.  BoundColumn: 1
     c.  ColumnCount: 2
     d.  ColumnWidths: 0, 1.5
Note: adjust the 2nd column width as necessary to show all of your description

Author Closing Comment

ID: 40294682
Thank you.
LVL 49

Expert Comment

by:Dale Fye
ID: 40294767
glad to help.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

868 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