Numbering Query Results

  • Thread starter Thread starter mary_jane_steele@hotmail dot com
  • Start date Start date
M

mary_jane_steele@hotmail dot com

I've done this years ago and can't figure out how to do
it again. I want to create a column that sequentially
numbers the query results. What expression do you use?
 
I've done this years ago and can't figure out how to do
it again. I want to create a column that sequentially
numbers the query results. What expression do you use?

It's really easy *in a Report* - put a textbox on the report with a
Control Source of

=1

and set its Running Sum property to Over All.

It's actually rather difficult in a Query. You will need some field in
the query that you can count on being sorted in strictly ascending (or
descending) order, no ties; you can then put in a calculated field

SeqNo: DCount("*", "[your-query]", "[sortfield] <= " & [sortfield])
 

Ask a Question

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.

Ask a Question

Back
Top