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])
 
Back
Top