sql="INSERT INTO tabla...." conncarro.execute sql Set rsId = conncarro.Execute("SELECT @@IDENTITY") nuevoId = rsId(0)