You're missing my point.
When you say "the first "A" record gets a 1, the 2nd record gets a 2" and so on, how do you define "first"? What makes something "2nd"?
This is not merely semantics. The concepts of "first", "2nd", "third", etc have a name - these are called "ordinal numbers" and as the name implies this means that the numbering is based on some sort of ordering.
The query I gave you will number the rows based on an ordering which I invented, i.e. some date.
What is the basis of your
Now, in the case of your detail lines, you would be better served by assigning something that distinguishes one detail line from another at the time the lines were entered. In other words, you probably should have assigned the line number as each line is entered. Thus, the key in your detail table should consist of the purchase order number plus
some identifier like an assigned line number.
What is the key for your detail table now? (If you used an autonumber ID column, you can use that in the query I posted instead of the date I assumed. - you need something
to distinguish one detail line from another for a given purchase order - something on which to base "firstness", "secondness" etc. Anything that can be ordered will do.
Custom Apps, Inc.