Hello all!
I have just created my first access application ever using Access 2003 (also my first VB-experience). In a form i would like to find out which autoincrement-PK result I just had in the "after insert" event.
Im trying this:
But I get error 3085 "undefined function scope_identity()"
If I use @@IDENTITY I get zero all the time
Any ideas?
I have just created my first access application ever using Access 2003 (also my first VB-experience). In a form i would like to find out which autoincrement-PK result I just had in the "after insert" event.
Im trying this:
Code:
Dim lpRowIdRecordSet As DAO.recordSet
Set lpRowIdRecordSet = CurrentDb.OpenRecordset("SELECT SCOPE_IDENTITY() AS row_id")
But I get error 3085 "undefined function scope_identity()"
If I use @@IDENTITY I get zero all the time
Any ideas?