VBA & Macro Problems

Fix "You can't assign a value to this object" Access Error When Resetting Check Boxes

Algirdas JasaitisAlgirdas Jasaitis Oct 28, 2026 870 views

Question details

The user encounters a VBA error when attempting to programmatically reset check boxes in an Access form.

How to Fix Access Error When Resetting Unbound Check Boxes via VBA
Product
Microsoft Access
Device & OS
not provided
Scenario
Using VBA code to reset multiple check boxes to False on a form.
Observed behavior
Microsoft Access throws the error message "You can't assign a value to this object". This often occurs because the control is actually bound to data or contains an expression in its ControlSource property.
Before you start

Verify that the check boxes you intend to reset are truly unbound by opening the form in Design View and ensuring the Control Source property in the Property Sheet is completely blank.

Solution 1Recommended

Identify and Reset Check Boxes Using the Tag Property

Prevent assigning values to invalid or bound controls by explicitly filtering the intended check boxes using their Tag property before modifying them.

Iterating through all controls on a form and resetting them blindly often leads to assignment errors when the code hits a bound control or an unsupported object type. By utilizing the Tag property, you instruct VBA to only reset the specific unbound check boxes you have manually marked for this operation.

1
Set the Tag Property

Open your Access form in Design View. Select all the unbound check boxes you want to reset. Open the Property Sheet (F4), navigate to the 'Other' tab, and type a specific identifier like 'ResetMe' in the Tag field.

2
Implement the VBA Loop

Open the VBA editor for your form. Create or modify your reset subroutine to loop through the 'Me.Controls' collection.

3
Check Tag and Assign Value

Inside the loop, add an If statement to check if the control's Tag equals 'ResetMe'. If it matches, assign 'False' to the control's value.

Identify and Reset Check Boxes Using the Tag Property
Error Handling Recommendation: Avoid using broad error suppression like 'On Error Resume Next'. Instead, use structured error handling (Select Case Err.Number) to gracefully manage expected assignment errors while still reporting unexpected ones.
Free Microsoft Office alternative

Need a Free and Lightweight Office Suite? Try WPS Office

While WPS Office does not include a direct database alternative to Microsoft Access, it serves as a highly compatible, lightweight, and completely free alternative to Microsoft Word, Excel, and PowerPoint for your everyday document, spreadsheet, and presentation tasks.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the Suite: Run the setup file and follow the on-screen prompts to complete the quick installation process.
  3. 3. Open Your Office Files: Launch WPS Office and directly open your existing Word, Excel, or PowerPoint files without worrying about formatting loss.
Seamless format compatibility with Microsoft Office (.docx, .xlsx, .pptx).Familiar user interface ensuring a zero learning curve and smooth migration.Lightweight application footprint resulting in extremely fast startup times.Built-in PDF editing tools for streamlined document management.
QA img-9

Frequently Asked Questions

Why does Microsoft Access say "You can't assign a value to this object"?

This error typically occurs if your VBA code tries to assign a value to a control that is bound to a calculated field, contains an expression in its Control Source property, or is locked against edits.

How do I check if my check box is bound or unbound?

Open the form in Design View, select the check box, and press F4 to open the Property Sheet. Check the Data tab; if the "Control Source" field is blank, the check box is unbound.

Is it safe to use 'On Error Resume Next' to bypass this error?

It is generally not recommended. Broad error suppression can hide other critical runtime errors. It is better practice to identify the correct controls using the Tag property or to handle specific error codes using a Select Case statement.