Auto Number

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
 
T

Tonín

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
 
Top