Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record number in a query

Status
Not open for further replies.

Francis

Programmer
Jan 26, 1999
124
GB
Simple question I hope.
I want to add a calculated field to a query that contains the record number. I have looked in the help but cannot find it.
Thanks
 
The reason you can't find it is because it's not there - "record numbers" are pretty much meaningless in a table.

There is a CurrentRecord property for a recordset in a form that you can access in VB or a macro, but I'm not sure that it's available in a query. Since a query's recordset is dynamic, how would it know the record number until AFTER it's gathered all the records? And even then, what does the number represent? How does the "record number" change if I sort the query differently?

Jim



How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
The query produces a recordset that is in the order that I want to use in another recordset. Yes, if I change the query to change the order then I want to get the new record numbers.
It seems such an easy thing. I have worked around it by a bit of code that generates a recordnumber. However I was hoping to get it all into the query
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top