Obtaining a return value from a query

  • Thread starter Thread starter Jim Crawford
  • Start date Start date
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?
 
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.
 
Back
Top