Counter

J

JF Bouthillier

Hi,

I am looking to have a counter in my dynamic query. I have a subroutine
incrementing a value but as soon as I scroll in the records, the values are
changing...

How can I make sure that a record stays with the same number (for the same
query execution)?

Thanks a lot.
 
A

Allen Browne

Simplest way to do this is to turn the query into an Append query, and add
the records to a table with an autonumber.

It is possible to use a subquery or DCount() expression to count the
preceeding records, but this is inefficent, unreliable if the filter/sort
changes, and impractical if there is not a simple and consistent way to
identify "preceeding records."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top