Others

How to Clear All Controls Including Option Buttons on an Unbound Access Form

Steven ParkerSteven Parker Oct 21, 2026 869 views

Question details

The user needs to clear all data input controls on an unbound Microsoft Access form, specifically addressing the issue where option buttons remain selected after triggering a Clear All command.

How to Clear All Controls Including Option Buttons on an Unbound Access Form
Product
Microsoft Access
Device & OS
not provided
Scenario
Writing or troubleshooting a VBA macro to reset user inputs on a custom, unbound Access form.
Observed behavior
When executing the clear command, text boxes, check boxes, combo boxes, and list boxes are successfully cleared, but option buttons incorrectly remain selected.
Before you start

Before modifying your VBA code, verify whether your option buttons are standalone controls or placed inside an Option Group (Frame), as this changes how Access handles their values.

Solution 1Recommended

Update VBA Select Case Statement to Include Option Buttons

Modify the existing control loop in your VBA code to explicitly handle the standalone option button control type.

In Microsoft Access, standalone option buttons require explicit instructions to be reset. If you are looping through form controls using a Select Case statement, you must declare the acOptionButton type to clear them alongside text boxes and checkboxes.

1
Open the VBA Editor

Open your Microsoft Access database, switch your unbound form to Design View, and press ALT + F11 to launch the Visual Basic Editor.

2
Locate the Clear Command Loop

Find the Click event procedure associated with your 'Clear All' button. Locate the 'Select Case' statement where you are looping through the form controls.

3
Add the Option Button Case

Insert the code 'Case acOptionButton' followed by a new line with '.Value = False'. This ensures that any standalone option buttons are deselected when the macro runs.

Update VBA Select Case Statement to Include Option Buttons
Handling Option Groups: If your option buttons are controlled by an Option Group (Frame), do not clear the individual buttons. Instead, add 'Case acOptionGroup' and set its value to Null (e.g., .Value = Null) to reset the entire group.
Free Microsoft Office alternative

Looking for a Lightweight Alternative to Microsoft Office?

While WPS Office does not include a direct database replacement for Microsoft Access, it offers robust and free alternatives for Word, Excel, and PowerPoint. Experience a lightweight productivity suite with excellent compatibility for all your standard document, spreadsheet, and presentation needs.

  1. 1. Visit the Official Website: Navigate to the official WPS Office website on your web browser.
  2. 2. Download the Installer: Click the Free Download button to get the latest version for your operating system.
  3. 3. Install and Run: Run the installer, follow the on-screen prompts, and start enjoying high-compatibility document editing.
Free and lightweight suite for everyday office tasksHigh compatibility with Microsoft Office formats like DOCX, XLSX, and PPTXFamiliar user interface for seamless migration without a learning curveBuilt-in PDF editing, conversion, and annotation tools
QA img-9

Frequently Asked Questions

Why do option buttons remain selected when clearing an Access form?

Option buttons are typically designed to work within an Option Group where only one choice is valid. When they are used as standalone controls outside a frame, Access VBA requires you to explicitly target them using the acOptionButton constant to reset their state to False.

How do I clear an Option Group frame in Access VBA?

To clear an entire option group, you must clear the frame holding the buttons, not the buttons themselves. In your VBA code, set the value of the Option Group control to Null (e.g., Me.FrameName.Value = Null). This will automatically deselect whichever option button was chosen.

What is the difference between an unbound and bound form in Microsoft Access?

A bound form is directly connected to a specific table or query, meaning data changes are automatically saved to the database. An unbound form is not connected to any data source, so developers must use VBA code to manually insert data into tables or clear the input fields.