offie is correct, of course, the Combobox Control is the way to go! In Form Design View, go to the Ribbon - Design Tab - Controls, click on the Combobox Icon and place it on the Form. The Combobox Wizard will walk you through the setting it up.
Some points to consider when using a Combobox
Selecting a Row Source Type for your Combobox:
- If you're absolutely sure that the items to be displayed, in the Combobox, will never change, and are reasonably small in number, use a Row Source Type of Value List; you'll be asked to type in these Values. Adding or deleting items from a Value List, at a later date, will require an Access developer going back into Design View of the Form.
- If the conditions given above are not true, use a Row Source Type of Table/Query. If items need to be added or deleted, at a later date, this can be done by a user doing so through a Form based on the Table or Query, or directly through the Query.
If the selection made from the Combobox is to be used to populate a Field in the Form's RecordSource:
- If it is not possible that items will ever be deleted from the Table or Query that feed the Combobox, you can Bind the Combobox directly to that Field.
- If, on the other hand, it is possible that items will be deleted from the Table or Query that feed the Combobox, but that these deleted items will still need to be displayed as a part of active Records do not Bind the Combobox directly to that Field! Instead, assign the Value of the selected item to a Textbox on the Form, using the AfterUpdate event of the Combobox, and have this control Bound to that Field.
To understand the second set of considerations, above, imagine that you have a Form used to enter data about a company's projects. You create a Record for a new project and select the supervisor's name from 'Supervisor Combobox.' If you Bind the selection from the Combobox directly to the Supervisor Field in the underlying Table/Query, and at a later date that supervisor leaves the company, you don't want his name to still appear in the Combobox. Some nimnutz might accidentally assign a supervisor, who no longer works for the company, to a new project! So you arrange for the supervisor's name to no longer appear as a selection in the Combobox. The aforementioned human-bean is now prevented from assigning a new project to a non-existent supervisor! Good! Problem solved!
Well, that problem is solved! But when you now look at any projects that were assigned to this supervisor, and look at the Combobox, to see who the supervisor was, the Combobox is blank, because that supervisor's name is no longer in the Combobox! That's the time you need to use the second method above, and assign the item selected from the Combobox to a Textbox on the Form that is Bound to the Field in the underlying Table or Query. While the supervisor's name no longer appears in the Combobox, it will still appear in the Textbox that it was assigned to!
Linq ;0)>