Jun 13, 2007 #1 jambai Programmer Joined Mar 21, 2007 Messages 58 Location 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
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
Jun 13, 2007 #2 PWise Programmer Joined Dec 12, 2002 Messages 2,633 Location US set rst = currentdb.openrecordset ("select @@identity as idval") a=rst!id Upvote 0 Downvote
Jun 13, 2007 #3 PWise Programmer Joined Dec 12, 2002 Messages 2,633 Location US a=rst!idval Upvote 0 Downvote