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

SCOPE_IDENTITY IN MS ACCESS ?

Status
Not open for further replies.

jambai

Programmer
Mar 21, 2007
58
US
Does anyone know how to get the @@Identity value after the insert query and use it in VBA.

strIns = "Insert Query"
Docmd.RunSQL, strIns

I am using linked DataFlex table through ODBC.

Thanks
Jambai
 
set rst = currentdb.openrecordset ("select @@identity as idval")
a=rst!id
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top