Others

Use a Microsoft Access Append Query to Create Multiple Records per Row

Nimra MalikNimra Malik Nov 25, 2026 868 views

Question details

Create one output record for each integer from a source row's count down to 1, and optionally append those records to a table.

Create Multiple Records per Row with a Microsoft Access Query
Product
Microsoft Access
Device & OS
not provided
Scenario
A PieceTicketLines table contains an mCount value that determines how many records each source row should produce.
Observed behavior
An equality join returns only one matching counter per source row. The goal is to produce six records with counter values 6 through 1 when mCount is 6.
Before you start

Check the largest expected mCount value and create a Counters table with a unique integer field named Counter containing every value from 1 through at least that maximum. Confirm that the source field names match the SQL below, and avoid naming a field Count because it is an SQL reserved word.

Solution 1Recommended

Return Multiple Records with a Counters Table

Use a select query when you need the expanded records without storing them in another table.

The query pairs each source row with every counter value up to mCount. An equality join produces only one match, so it does not create the desired sequence.

1
Create the counters

In Access, use Create > Table Design to create a Counters table with a Number field named Counter. Set Counter as the primary key, save the table, and enter consecutive integers from 1 through the largest expected mCount.

2
Open SQL View

Select Create > Query Design, close the table-selection dialog if it appears, and switch to View > SQL View.

3
Enter the query

Replace the SQL with: SELECT PieceTicketLines.Project, PieceTicketLines.eMark, Counters.Counter AS SequenceValue, PieceTicketLines.mCount, PieceTicketLines.Series, PieceTicketLines.Width, PieceTicketLines.eLength, PieceTicketLines.GroutCorelnft FROM PieceTicketLines, Counters WHERE Counters.Counter <= PieceTicketLines.mCount ORDER BY PieceTicketLines.Project, PieceTicketLines.eMark, Counters.Counter DESC;

4
Run and check the results

Click Run. For a source row with mCount of 6, the SequenceValue column should show 6, 5, 4, 3, 2, and 1; the original mCount remains 6 in each result row.

Return Multiple Records with a Counters Table
Check the counter range: A positive whole-number mCount produces that many rows only when the Counters table contains every required integer. Zero, negative, or null values produce no rows.
Free Microsoft Office alternative

Work with Exported Access Data in WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface. Export Access query results to a spreadsheet format to review and share them in WPS; WPS does not run or repair Access append queries.

Review expanded query results in WPS Spreadsheets after exporting them from AccessCompatible with Microsoft Excel XLSX and XLS filesFamiliar spreadsheet interface makes the transition straightforwardFree, lightweight office tools for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Why does my join return only one copy of each row?

A join condition such as Counters.Counter = PieceTicketLines.mCount matches only the counter equal to mCount. Use both tables in the FROM clause and filter with Counters.Counter <= PieceTicketLines.mCount to return all counters up to that value.

Can I display the values from 6 down to 1?

Select Counters.Counter as a separate output column and add ORDER BY Counters.Counter DESC, along with any source fields you want to group the results by.

Do I have to use an append query?

No. Run the select query in Access to view the expanded records without storing them. Use INSERT INTO only when you need to add them to a destination table.

What happens if the Counters table does not go high enough?

The query can return only the counter values present in the table. Add consecutive integers through at least the largest expected mCount before running the query.

Can WPS Office run the Access append query?

No. Run the query in Microsoft Access. To review its results in WPS Spreadsheets, export the results from Access to an Excel or CSV file and open that file in WPS.