Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Last Record with All Columns

Status
Not open for further replies.

Computerpak

IS-IT--Management
Jun 26, 2001
6
US
I am trying to retrieve the last record inserted into an Access database. I have created a field in the table that uses the AutoNumber function to create a new ID for each record. When I try to retrieve this last record by using "Last" function and setting TOP value =1, all I can get is the ID field. How do I retrieve all of the fields
from the table.

 
What fields are you putting in your query? If you're only putting in the one field that you have the LAST criteria on that's all you'll get.

Jim DeGeorge [wavey]
 
Following are the fields in the Table Inventory
Item_id is autonumber Field
ItemDetail
ItemType
Qty
Price
Remarks
 
SELECT TOP 1 *
FROM Inventory
ORDER BY Item_ID Desc;

Duane
MS Access MVP
 
Thank you very much, it really worked.
It was a good experience
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top