Question: I always use this query in sql server to get Row number in a table:

```
SELECT *
FROM   (SELECT *,
               Row_number()
                 OVER(
                   ORDER BY [myidentitycolumn]) RowID
        FROM   mytable) sub
WHERE  rowid = 15  

```

Now I am working in Access 2010 and this seems to be not working. Is there any replacement for this query in Access?

Answer: 
Another way to assign a row number in a query is to use the `DCount` function.

```
SELECT *, DCount("[ID]","[mytable]","[ID]<=" & [ID]) AS row_id
FROM [mytable]
WHERE row_id=15

```
I might be late. Simply add a new field ID in the table with type AutoNumber. This will generate unique IDs and can utilize in Access too