"Last" is a relative term. It implies that there is an order to the dataset. The problem is that a table has no order. A table is a "bit bucket". It might look like there is an order, but the next time you open the table, the records can be in a completely different "order".
If you say "I want to delete the record with the highest (maximum) ID", that can be done.
You could use: DMax() or a recordset to get the maximum ID number, then use a delete query to delete the record.
Code:
Dim lngMax as Long
lngMax = DMax("ID", "YourTable")
CurrentdB.Execute "DELETE * FROM YourTable WHERE ID = " & lngMax, dbFailOnError
or
Code:
Public Sub DeleteLastRec()
Dim sSQL As String
Dim r As DAO.Recordset
Dim lngMax As Long
'use a query to get max value from table
sSQL = "SELECT TOP 1 Max(ID) FROM YourTable ORDER BY ID Desc"
Set r = CurrentDb.OpenRecordset(sSQL)
lngMax = r("ID")
r.Close
Set r = Nothing
'Delete the record
sSQL = "DELETE * FROM YourTable WHERE ID = " & lngMax
CurrentDb.Execute sSQL, dbFailOnError
End Sub