Others

How to Prevent Users from Deleting Access Combo Box Values

Olivia MillerOlivia Miller Nov 3, 2026 869 views

Question details

The user wants to enforce selections in a Microsoft Access combo box by preventing users from clearing or deleting the displayed value.

How to Prevent Users from Deleting Access Combo Box Values
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.
Before you start

Ensure you have your Microsoft Access database open in Design View and possess a basic understanding of adding VBA code to form events.

Solution 1Recommended

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.

1
Enable Limit To List

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'.

2
Access the Before Update Event

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.

3
Add VBA Validation Code

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

4
Save and Test

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.

Bound vs Unbound Controls: The Undo command works most effectively when the combo box is bound to a field in your underlying table or query. For unbound controls, you may need to manually reassign a default value in your VBA code.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the Software: Run the downloaded installer file and follow the straightforward on-screen instructions to complete the setup.
  3. 3. Open Office Files: Launch WPS Office to instantly open, edit, and save your existing Microsoft Office documents with perfectly preserved formatting.
Highly compatible with Microsoft Excel, Word, and PowerPoint formatsLightweight design ensures fast loading and smooth performance on any PCFamiliar user interface makes migration effortless with zero learning curveBuilt-in advanced PDF editing capabilities at no extra cost
microsoft office alternative - wps office

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.