How to Automatically Display Related Access Form Values
Question details
The user needs to display related information, such as trainer codes, status, and attachments, automatically on an Access form when a specific formation or trainer is selected.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Designing a data entry or view form in a relational database where selecting one record from a dropdown should auto-fill or display associated details.
- Observed behavior
- The form needs to be configured to show related values without manually duplicating data entries across tables, utilizing relational database principles.
Ensure your database tables are properly related using primary and foreign keys, and that you have your target form opened in Design View.
Configure Combo Boxes and Unbound Controls
Use a combo box to store the foreign key while displaying descriptive text, then use unbound text boxes to show the additional related columns.
In a properly normalized database, you should store primary keys as foreign keys rather than duplicating related data. You can pull multiple columns of related data into a combo box and display them seamlessly on your form.
Select your combo box in Design View. In the Property Sheet, set the Control Source to your foreign key field. Set the Row Source to a query that includes the primary key and all related fields you want to display (e.g., TrainerID, TrainerName, Status).
Still in the Property Sheet, go to the Format tab. Set the 'Column Count' to match the number of fields in your query (e.g., 3). Set 'Column Widths' to hide the ID column and show the text (e.g., 0 inches; 1.5 inches; 1 inch).
Add text box controls to your form where you want the related data (like Status or Trainer Code) to appear. Delete their attached labels if they are not needed.
In the Property Sheet for each unbound text box, go to the Data tab. Set the Control Source using the expression =cboName.Column(X), replacing 'cboName' with the actual name of your combo box and 'X' with the column index you want to display.

Verify Query Output and Database Design
Ensure your underlying tables use proper relational design and that the Row Source query retrieves the correct columns.
Need a Lightweight Office Suite for Daily Tasks?
While Microsoft Access is a specialized tool for complex relational databases, for your everyday documentation, data analysis, and presentation needs, WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office.
- 1. Download WPS Office: Visit the official WPS website and download the free installer tailored to your operating system.
- 2. Install and Launch: Run the installation file and open WPS Office on your computer.
- 3. Open Your Documents: Open your existing Word, Excel, or PowerPoint files directly in WPS Office to continue your work with perfect format compatibility.

Frequently Asked Questions
Why is my unbound text box showing a #Name? error or remaining blank?
This usually happens if the combo box's Column Count property is lower than the index you are trying to access. Ensure the Column Count on the Format tab of the combo box matches the total number of fields in the Row Source query.
Do I need to write VBA code to update the related values?
No, using the =cboName.Column(index) expression in the Control Source of an unbound text box automatically updates the displayed value whenever the combo box selection changes, without requiring any VBA macros.
How do I hide the primary key in my combo box but still save it to the table?
Set the combo box's Bound Column to the primary key column (usually 1), and then set its Column Widths property to 0 for the first column (e.g., 0";1.5"). This visually hides the ID while displaying the text, but Access still stores the hidden ID in the database.




