How to Show an Access Text Box Based on a List Box Selection
Question details
The user needs to display a conditionally hidden text box when selecting 'other' from a list box in an MS Access form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Creating a dynamic MS Access form where specific controls become visible based on a user's selection in a list box.
- Observed behavior
- The After Update VBA event runs without errors, but the targeted text box remains invisible despite selecting 'other' in the list box.
Ensure you have design permissions for the Access form and that macros or VBA code execution are enabled in your database Trust Center settings.
Verify List Box Bound Column and Simplify VBA Code
Check if the list box is returning the expected text value and use a streamlined VBA condition in the After Update event.
Often, the VBA code is structurally correct, but the list box returns a numeric ID instead of the text 'other'. This occurs because the Bound Column property is set to an ID field rather than the text field.
Open your Access form in Design View, select the list box control, and press F4 to open the Property Sheet.
Navigate to the Data tab and check the 'Row Source' and 'Bound Column' properties. Confirm that the text 'other' is actually the value stored in the bound column (e.g., if 'other' is in the second column, Bound Column should be 2).
Switch to the Event tab, find the 'On After Update' property, and click the ellipsis (...) to open the VBA editor.
Update your VBA procedure to: Me.TxtYourTextBoxName.Visible = (Me.lstYourListBoxName = "other"). Ensure you replace the placeholder names with your actual control names.

Looking for a Free, Lightweight Office Alternative?
While Microsoft Access handles complex relational databases, for most everyday data management, tracking, and reporting needs, WPS Spreadsheet offers a lightweight and highly compatible solution without the hefty subscription fees.
- 1. Download and Install: Visit the official WPS website to download and install the free suite on your device.
- 2. Open WPS Spreadsheet: Launch WPS Office and open Spreadsheet to start managing your data lists.
- 3. Import Existing Data: Easily open your exported CSV or Excel files directly in WPS Spreadsheet to continue working.

Frequently Asked Questions
Why does my VBA code run but the text box visibility doesn't change?
This usually happens when the condition in your VBA code evaluates to False. In list boxes, it is often because the bound column contains a numeric ID rather than the exact text string (like 'other') you are checking against.
How do I find the exact name of my text box or list box in Access?
Open the form in Design View, click on the specific control, and look at the 'Name' property located at the very top of the Property Sheet under the 'All' or 'Other' tab.
Can I show or hide multiple controls based on one list box selection?
Yes. You can add multiple lines inside the same After Update event procedure, setting the .Visible property to True or False for each individual control based on the evaluated list box value.




