Find Primary Key for record just added

D

dhstein

How can I find the primary key of the last record added to a table? Thanks
for any help on this.
 
D

Dirk Goldgar

dhstein said:
How can I find the primary key of the last record added to a table?
Thanks
for any help on this.


Under what circumstances, and how was the record added?
 
J

Jerry Whittle

If the table has a Date/Time field with a default value of Now(), you could
look up the newest record based on that field. Use the Max function. One
problem is that Now() is only good to a second. If more than one record was
added in a second, then knowing the truel last record could be a problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top