Automatically Select a New Combo Box Item in Microsoft Access
Question details
Automatically select a newly entered business in an Access combo box after adding it to a related table.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user enters a business that is not yet in the combo box list and adds it to the related table.
- Observed behavior
- The combo box opens its dropdown list but does not automatically select the newly added business.
Open the form in Design View and identify the combo box's Row Source and the table where new businesses are saved. Confirm that the row source can return the new business after it is added.
Set the NotInList response after adding the business
Use this method when the combo box's NotInList event adds the new business to the table.
Setting Response to acDataErrAdded tells Access that the item was added. Access then refreshes the list and accepts the new value.
Set this response only after the insert succeeds. Use acDataErrContinue if the value was not added and you want to suppress the default error message.
Open the form in Design View, select the combo box, and open its Property Sheet. On the Data tab, set Limit To List to Yes.
On the Property Sheet's Event tab, set On Not In List to [Event Procedure], then click the builder button (...) to open the VBA editor.
In the combo box's NotInList procedure, keep the code that saves NewData to the business table. Immediately after a successful insert, add: Response = acDataErrAdded. If the insert fails or the user cancels, do not set acDataErrAdded; use Response = acDataErrContinue when handling the error yourself.
Save the form, switch to Form View, and enter a business that is not in the list. After it is saved, confirm that the combo box displays the new selection.

Use WPS Office for everyday business documents
WPS Office is a free, lightweight alternative for working with spreadsheets, documents, and presentations. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files into your workflow. It does not replace Access database forms or fix Access combo box events.

Frequently Asked Questions
Where do I find the combo box's NotInList event?
In form Design View, select the combo box and open its Property Sheet. On the Event tab, choose [Event Procedure] for On Not In List and click the builder button (...).
When should I use acDataErrAdded?
Set Response = acDataErrAdded in the NotInList procedure only after the new value has been saved successfully. Access then refreshes the list and accepts the value.
What should I do if the new business still does not appear?
Check the combo box's Row Source on the Property Sheet's Data tab. Verify that its query or stored procedure returns the new record and that filters or missing fields are not excluding it.
What happens if the user cancels adding the business?
Do not set Response to acDataErrAdded. If your code handles the cancellation and should suppress Access's default message, set Response to acDataErrContinue.




