How to Update Check Box Visibility When Changing Records in Access
Question details
The user needs to refresh the visibility of dependent fields in a Microsoft Access form based on a check box value when navigating between different records.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Navigating between records in a Microsoft Access form that contains dynamic, conditionally visible dependent fields.
- Observed behavior
- Calling a check box click event from the Form_Current event fails to update the controls correctly for each newly selected record.
Before modifying your form's code, ensure you have backed up your Access database. Open your form in Design View and verify the exact names of your check box and the dependent controls you plan to show or hide.
Create a Reusable Procedure for Control Visibility
Extract the visibility logic into a dedicated subroutine and call it from both the Form_Current and AfterUpdate events to ensure consistent behavior across all records.
Directly triggering a click event from a form's current event can lead to inconsistent behavior and update failures. The most reliable approach is to write a single, custom subroutine that handles the visibility rules, and then trigger that subroutine whenever the record changes or the check box is manually clicked.
Open your Microsoft Access form in Design View. Select your check box, navigate to the Property Sheet, go to the Event tab, and click the builder button (...) next to 'After Update' to open the VBA Editor.
In the VBA module for your form, write a new private subroutine named UpdateControlVisibility. Inside it, use an If statement to evaluate the check box value and set the target control's visibility (e.g., If Me.chkMyCheckBox = True Then Me.txtDependentField.Visible = True Else Me.txtDependentField.Visible = False).
Locate the AfterUpdate event procedure for your check box in the VBA Editor. Insert a single line of code to run your new sub: Call UpdateControlVisibility.
Select 'Form' from the top-left object dropdown in the VBA Editor, and 'Current' from the top-right procedure dropdown. Add Call UpdateControlVisibility inside the Form_Current event. Save your code and switch to Form View to test.

Looking for a Lightweight Alternative for Daily Office Tasks?
While Microsoft Access handles complex relational databases, you might find everyday document editing, spreadsheet analysis, and slide presentations much easier with WPS Office. It provides a free, highly compatible, and lightweight suite designed to streamline your daily workflow.
- 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 executable file and follow the on-screen prompts to complete the installation.
- 3. Open Your Documents: Launch WPS Office and instantly open your existing .docx, .xlsx, or .pptx files to start working without any formatting issues.

Frequently Asked Questions
Why doesn't calling the CheckBox_Click event from Form_Current work?
Directly calling control event handlers like CheckBox_Click from the Form_Current event is bad practice in VBA. It can fail to properly evaluate the new record's state or trigger infinite loops. Using a dedicated custom subroutine isolates the logic and executes cleanly.
What is the Form_Current event in Microsoft Access?
The Form_Current event is a trigger that fires whenever the focus moves to a record, making it the active record, or when the form is requeried. It is the ideal place to insert code that updates the form's layout or display based on the data specific to the current record.
How do I hide multiple controls at once based on one check box?
Inside your custom UpdateControlVisibility subroutine, you can add additional lines of code to set the .Visible property for each control you want to hide or show, using the same If...Then logic based on the single check box's current value.
Can I use Conditional Formatting instead of VBA for changing visibility?
No. Conditional Formatting in Microsoft Access can change background colors, font styles, or enable/disable controls, but it cannot alter the Visible property of a control. To completely hide or show controls, you must use VBA.




