With only 6 rows, not sure why you need to now the row #'s - assume you are using the output as part of some other code.
I have no idea how to do it as a part of a query, but I know how to get a row # next to every record - copy\paste the query or change the query to a Make-Table query - decide on the name of the table - run the query - now export the table as a text file same name - import it as a table with a slightly different name - in the Import Text Wizard after clicking NEXT 5 x's - make sure the default "Let Access add primary key" is selected - this will add a # to each row. To automate all that, create a macro to run the query, export the table, and import the text file. --- In [email protected], "Marty" <[EMAIL PROTECTED]> wrote: > > I have a query that can have anywhere from 1 to 6 rows of output. I > need a way to be able to know what line the each row is. Below is a > rough example of the way the query output is now. At the beginning of > each output line I need to have a line (row) number. How do I do this > in a query? The methods I have been trying have not worked. My guess > is a subquery of some kind but that is not any where near one of my > strong suits. Thanks all for help. > > 2205,57377,ABC,23,2205,55645,95774,406,A520,38.60,CWT,29.47,CWT,1137.54 > 2205,57377,ABC,23,2205,55645,95774,406,G660,38.60,CWT,6.43,CWT,- 248.19 >
