Auto Number

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Is there way to use Auto Number in a query?

For example query returns

Name Address Record ID
A 100 1
B 500 2

I want to add a field that keeps count.

I hope this makes sense.
Thanks
 
If you really, really need it. And if you don't need an "updatable" query,
and assuming your "Name" field is unique ... then you can use next query:

SELECT YourTable.NameField, YourTable.AddressField, (SELECT
Count(YourTable_1.NameField) FROM YourTable AS YourTable_1 WHERE
YourTable_1.NameField<=YourTable.NameField) AS RecordID
FROM YourTable;

BTW, I changed Name into NameField and Address into AddressField.


Tonín
 

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

Back
Top