Simply producing the count of the number of lines produced by a query
would be quite independent of any column of the results. Perhaps you
want a ranking column that counts down the rows starting from 1. If
so, you might start from a query like this:
SELECT ID,
(SELECT COUNT(*) + 1 FROM YourTable T1
WHERE T1.ID < T.ID) AS Rank
FROM YourTable T
ORDER BY ID
Add other columns as desired
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.