Cyber-Drugs
asked on
VBA - Determine last Inserted UID
Hi guys,
I wanted to know if it's possible to run an Insert statement on a table, and then determine what the UID (also the primary key) of that entry is?
Cheers guys!
I wanted to know if it's possible to run an Insert statement on a table, and then determine what the UID (also the primary key) of that entry is?
Cheers guys!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
There will be one whole user of this amazingly big database (excuse the sarcasm :P )
So I can presume Dmax() will be safe?
So I can presume Dmax() will be safe?
Yes. If you wanted to expand, you'd need to do something else.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers guys!
if u use a recordset to add (one I prefer to use if u have several fields to add) then once u do AddNew, u get the UID number (if its a autonumber)