How do I extract a return value from a pass-through Query using code?

  • Thread starter Thread starter Dick Marcum
  • Start date Start date
D

Dick Marcum

I am trying to create a pass-through query in MS Access,
using code, to get to an SQL Server and return a single
integer. I want to then use the return value to do
further processing. All of the references I can find show
how to use code to setup and execute the pass-through
query. I am able to do that ok.

I have been unable to find out how I can use code to
access the return value from my pass-through query.

How do I access(using code in a module) the return value
from my pass-through query so that I can use the returned
value and do some further processing with the return
value?

Thanks for any helpful information.

Dick Marcum
 
Dick Marcum said:
I am trying to create a pass-through query in MS Access,
using code, to get to an SQL Server and return a single
integer. I want to then use the return value to do
further processing. All of the references I can find show
how to use code to setup and execute the pass-through
query. I am able to do that ok.

I have been unable to find out how I can use code to
access the return value from my pass-through query.

How do I access(using code in a module) the return value
from my pass-through query so that I can use the returned
value and do some further processing with the return
value?

Thanks for any helpful information.

You need to create a recordset based on the query and then pull the value
from the Recordset. Alternatively you could just use DLookup() against the
query.
 
Rick

Thanks for the help. I guess I thought there was some
really esoteric way to do it and I overlooked the obvious.
Been looking at the code too long, I guess. Thanks again.
Dick
 
Back
Top