SOLVED

Add a row counter in a query

Steel Contributor

Hello, I have a query and I need to add a row counter.  

How can I do this?  

 

SELECT CoID, CompanyName
from tblCompanies

 

Example:

1 Co A

2 Co B

3 Co C

 

I need to add the 1,2,3...n

 thank you very much. 

 

1 Reply
best response confirmed by Tony2021 (Steel Contributor)
Solution

I found it online. I created a form and put a field on it.  For anybody that wants to know the counter is by way of a function and the code is here:
https://www.experts-exchange.com/articles/33069/Sequential-Rows-in-Microsoft-Access.html
by Gustav Brock.

1 best response

Accepted Solutions
best response confirmed by Tony2021 (Steel Contributor)
Solution

I found it online. I created a form and put a field on it.  For anybody that wants to know the counter is by way of a function and the code is here:
https://www.experts-exchange.com/articles/33069/Sequential-Rows-in-Microsoft-Access.html
by Gustav Brock.

View solution in original post