Obtaining a return value from a query

J

Jim Crawford

Using VB6 and Access 97

I want to write a query that will insert a row into a table. One field is
the unique ID field for the table and I would want the query to return that
value to me on completion of the INSERT

(Similar to the RETURN value that can be used in an SQL Stored procedure but
in ACCESS!)

Any one able to guide me please?
 
S

Smartin

Jim said:
Using VB6 and Access 97

I want to write a query that will insert a row into a table. One field is
the unique ID field for the table and I would want the query to return that
value to me on completion of the INSERT

(Similar to the RETURN value that can be used in an SQL Stored procedure but
in ACCESS!)

Any one able to guide me please?

I'd be interested in other responses as well.

The way I have done this is to set a variable with a timestamp and write
it to the table. I then query the table for the ID with that timestamp.

It works fine in the low traffic environment where I use it, but it
feels kludgy.
 

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