How to find out the last inserted row in Access

  • Thread starter Thread starter subbu
  • Start date Start date
Make a query and pull in the table. Pull a field, like ID from the table
into the grid. Select View/Totals.

Down in the grid, under "Total" row, change "Group By" to "Count".

Run query. Will tell you how many records in the table.

SQL:

SELECT Count(tablename.ID) AS CountOfID
FROM tablename;
 
Hi,
I want to find out the last inserted row in Access.How
to go about

If you are assuming that Access keeps track of which row was most
recently inserted, you are out of luck. IT DOESN'T. You must - no
option! - keep track of that yourself, either by using a timestamp
field with a default value of Now() - from which you can use a query
selecting the maximum value - or by using a Custom Counter field which
increments for each record.
 
Back
Top