how to add record number field in query

  • Thread starter Thread starter Ruth
  • Start date Start date
R

Ruth

I have a summary query that groups on vendor id.
I end of with three rows..one for each vendor.

I want to increment a field that is the record
number for the row. (Not a count of all the detail
records used to create the row)

How can I set up an expression field in the query that
ends up with a 1 for the first row, a 2 in the second row
and a 3 in the third row?

Thank you for your help!

Ruth
 
And what are you going to _do_ with this record number?

If the answer is, display it in a Report (perhaps not a bad guess
considering this newsgroup is about reports), there's an easier way --
create a calculated Control in the Report with a ControlSource of = 1 and
set its RunningSum property to the appropriate "over group" or "over all"
setting.

Larry Linson
Microsoft Access MVP
 
Back
Top