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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

@@IDENTITY equivalent in VBA ?

Status
Not open for further replies.

sogibear

Programmer
Jul 4, 2002
45
GB
Hello,

Does anyone know of a VBA function that returns the id of a NEW record added in a recordset as soon as it has been added ?

It can be done using @@IDENTITY in a 'Stored Procedure' but i need to use it in VBA.

Thanks

 
In Access, we always just made it an invisible field on the form and then called the value of the field after a save. There is probably a more elegant way, but this worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top