How to Prevent Users from Deleting Access Combo Box Values
Question details
The user wants to enforce selections in a Microsoft Access combo box by preventing users from clearing or deleting the displayed value.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Designing a database form where certain combo box controls require a valid predefined list selection and cannot be left blank.
- Observed behavior
- Users are able to highlight and delete the text inside the combo box, resulting in a blank value, even when the 'Limit To List' property is enabled.
Ensure you have your Microsoft Access database open in Design View and possess a basic understanding of adding VBA code to form events.
Use Limit To List and Before Update Event
Combine the built-in Limit To List property with a VBA Before Update event to validate the input and undo any attempts to leave the combo box blank.
While the Limit To List property successfully stops users from typing values that do not exist in the Row Source, it does not prevent them from deleting the text entirely. To achieve strict validation, you must use the Before Update event to intercept the change, check if the value is empty, and cancel the update if necessary.
Open your form in Design View, select the target combo box, and open the Property Sheet. Navigate to the Data tab and set the 'Limit To List' property to 'Yes'.
In the Property Sheet, switch to the Event tab. Click on the 'Before Update' property box, click the ellipsis (...) button that appears, select 'Code Builder', and click OK.
In the VBA editor, type the following code between the Private Sub and End Sub lines: If IsNull(Me.ActiveControl) Or Me.ActiveControl = "" Then MsgBox "You cannot leave this field blank.", vbExclamation Cancel = True Me.ActiveControl.Undo End If
Save your VBA code, close the editor, and switch your Access form back to Form View. Highlight the combo box text and press Delete to verify that the previous value is restored automatically.
Discover WPS Office for Your Everyday Document Needs
While Microsoft Access handles highly specialized database management, WPS Office is the perfect lightweight alternative for all your word processing, spreadsheet, and presentation tasks. Enjoy a familiar, highly compatible interface without the expensive subscription costs.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install the Software: Run the downloaded installer file and follow the straightforward on-screen instructions to complete the setup.
- 3. Open Office Files: Launch WPS Office to instantly open, edit, and save your existing Microsoft Office documents with perfectly preserved formatting.

Frequently Asked Questions
Why doesn't the 'Limit To List' property block blank values by default?
The 'Limit To List' property only restricts users from entering new text strings that aren't defined in the Row Source. A blank (Null) value is not considered a new list item, so it bypasses this specific property check.
Can I prevent deletion by setting the field to 'Required' in the table?
Yes, if the combo box is bound to a table field, setting the field's 'Required' property to 'Yes' in the Table Design view will prevent the record from being saved with a blank value. However, the error message will trigger when the user attempts to save or navigate away from the record, rather than immediately when leaving the combo box.
Is it possible to make the combo box completely read-only?
Yes. If you do not want users to interact with or alter the combo box at all, you can open the Property Sheet in Design View, navigate to the Data tab, and set the 'Locked' property to 'Yes'. This preserves the displayed value while preventing any user edits.




