Ident_current

Briandr

Registered User.
Local time
Today, 07:55
Joined
Jan 8, 2003
Messages
18
Can IDENT_CURRENT be used in Access 97 or above as shown in the example below?

Set delayTable = db.OpenRecordset("SELECT * FROM tblDelay WHERE DelayId = IDENT_CURRENT('tblDelay')", dbOpenDynaset, dbSeeChanges)

When I go to Debug->Compile Loaded Modules I get no errors. When the code runs then I get Error 3085, Undefined function 'IDENT_CURRENT' in expression.

Someone told me I could use this in Access 97. Someone else said its only to be used in SQL. Finally someone else told me to use MAX instead as shown below. So who is right?

Set delayTable = db.OpenRecordset("SELECT * FROM tblDelay WHERE DelayId = (SELECT MAX(DelayId) FROM tblDelay)", dbOpenDynaset, dbSeeChanges)

The line above using MAX does appear to work. I am just trying to satisfy my curiousity regarding IDENT_CURRENT
 
I don't believe IDENT_CURRENT has ever been in Access. It's in SQL Server, which uses Transact-SQL, but I've not seen it in Access in any versions from 2.0 (around 1994) through 2007.
 

Users who are viewing this thread

Back
Top Bottom