How to Create an Access Query for Multiple Class Officer Names
Question details
The user needs to retrieve student names for multiple class officer roles stored as separate student IDs in a single Access database table.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Displaying names for multiple officer positions (President, Vice President, etc.) based on student IDs within a single query result.
- Observed behavior
- The current query requires multiple aliases of the Students table, and the user is struggling to configure a crosstab query and display one-to-many relationship symbols for a normalized structure.
Before modifying your database relationships, ensure all tables are closed in your Access workspace and that your core Students table contains a properly defined primary key, such as StudentID.
Normalize Design with a Junction Table and Crosstab Query
Use a junction table to manage officer roles, allowing your database to scale easily without requiring structural table changes when new positions are added.
A normalized database design prevents redundancies. Instead of adding a new column to your table for every officer position, a junction table maps each student to their specific role and grade.
Navigate to the Create tab on the ribbon and select Table Design. Create a new table named 'ClassOfficers' with fields for Grade, OfficerType, and StudentID.
Go to Database Tools and click Relationships. Drag the StudentID from your core Students table to the StudentID field in your new junction table. In the Edit Relationships dialog, check the 'Enforce Referential Integrity' box to display the one-to-many symbols.
Click Query Wizard on the Create tab and choose Crosstab Query Wizard. Select your junction table and Students table, set the Grade as the row heading, OfficerType as the column heading, and Student Name as the intersecting value.

Use Table Aliases for the Existing Structure
If you cannot modify the current table structure, you can join the Students table multiple times within the query designer by using table aliases.
Manage Student Rosters Easily with WPS Spreadsheet
While Microsoft Access is built for complex relational databases, managing student officer roles and class rosters can often be accomplished much more intuitively in WPS Spreadsheet. It offers a familiar grid interface, extensive lookup functions to easily map student IDs to names, and seamless compatibility with Microsoft Excel formats—all without the steep learning curve of SQL and database table normalization.
- 1. Create a Master Student List: Open WPS Spreadsheet and list your students alongside their unique Student IDs in one primary worksheet.
- 2. Set Up an Officer Roster: Create a second worksheet with dedicated columns for Class Grade, President, Vice President, Treasurer, and Secretary.
- 3. Map Names Automatically: Use the VLOOKUP or XLOOKUP function in the officer columns to automatically fetch the corresponding student name from the master list based on their ID.

Frequently Asked Questions
Why don't the one-to-many relationship symbols show up in my Access database?
This occurs when referential integrity is not enforced between the tables. To fix this, open Database Tools, click Relationships, double-click the join line connecting your tables, and ensure the 'Enforce Referential Integrity' box is checked.
What is an Access crosstab query and when should I use it?
A crosstab query calculates data and groups the results by two sets of values (rows and columns), functioning much like a pivot table. It is ideal for displaying normalized database records—such as various officer roles—in distinct, readable columns.
How do I create a table alias in the Access query design view?
In the Query Design view, right-click the table you want to alias and select Properties. In the Property Sheet on the right side of your screen, type your desired name into the 'Alias' field. This allows you to join and query the same table multiple times.




