How to pass a parameter in a stored Access query

J

Jack

Hi,
I have a stored access query which is corresponding to a particular id.
However, I am using a login script to capture the value of an id. Now, I want
to dynamically open the stored query by passing the id captured via login.
Which means, I need to erase the static id value associated with the stored
query GMISExpenseCombo.
My question is how do i open this stored query by passing the id value to
the stored
query. I am using this stored query to retrieve some financial data for the
corresponding record. Any help is appreciated.
Currently, I am opeing the static stored query as follows
RS.Open "GMISExpenseCombo"
 
B

Bob Barrows [MVP]

Jack said:
Hi,
I have a stored access query which is corresponding to a particular
id. However, I am using a login script to capture the value of an id.
Now, I want to dynamically open the stored query by passing the id
captured via login. Which means, I need to erase the static id value
associated with the stored query GMISExpenseCombo.
My question is how do i open this stored query by passing the id
value to the stored
query. I am using this stored query to retrieve some financial data
for the corresponding record. Any help is appreciated.
Currently, I am opeing the static stored query as follows
RS.Open "GMISExpenseCombo"

Assuming the name of your connection variable is Conn, do this:

idvariable = ...
Set RS=createobject("adodb.recordset")
Conn.GMISExpenseCombo idvariable, RS

See here for more information (I've already provided this link to you -
didn't you read it?)

http://www.google.com/[email protected]&oe=UTF-8&output=gplain

Bob Barrows
 

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

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top