J
John
Ted Allen posted this message on how to create an
autonumber field in a query after it is sorted. I do not
understand what he is doing to create this field. Can
someone explain his logic.
THANKS in advance
Here is his advice:
It is possible to number the output rows of a query. To
do this, you create a new field and set the field's
source as a subquery that counts all lesser records based
on the sorted field(s).
But, in order for this to work properly the sorted fields
must result in unique combinations. If some records will
have the same values in the sorted fields, they will both
display the same row number. In those cases you would
usually add other fields to serve as tiebreakers in the
subquery to prevent duplicate row numbers.
If you aren't familiar with subqueries, post back with
your query sql and some info on what fields could be used
to uniquely identify records and I can help with the
subquery text.
autonumber field in a query after it is sorted. I do not
understand what he is doing to create this field. Can
someone explain his logic.
THANKS in advance
Here is his advice:
It is possible to number the output rows of a query. To
do this, you create a new field and set the field's
source as a subquery that counts all lesser records based
on the sorted field(s).
But, in order for this to work properly the sorted fields
must result in unique combinations. If some records will
have the same values in the sorted fields, they will both
display the same row number. In those cases you would
usually add other fields to serve as tiebreakers in the
subquery to prevent duplicate row numbers.
If you aren't familiar with subqueries, post back with
your query sql and some info on what fields could be used
to uniquely identify records and I can help with the
subquery text.