Retrieving AutoNumber Identity value in Access 2002

B

Bill

When using a recordset, this is easy.

Does anyone know how to do this using a query assigned to
to a querydef object? Thus after running qdf.execute
which inserts a record into Access 2002, how can I
reliably return the identity field? Would be nice if
there was something like Scope_Identity in SQL Server
2000.

The only way I know is to run a dlookup on other field(s)
that are guaranteed to be unique (inefficient) or use a
special field specifically for this purpose which inserts
a unique value.

Instead of dlookup is there an equivalent to the SQL
Servers ExcuteScaler method of a sqlcommand object?

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top