More Parameter help please :)

S

Steve

When setting parameters using QueryDefs.Parameters, is
there anyway of getting the required parameter name?

I am trying to get record counts from multiple queries,
with their names stored in a table, but the parameter can
vary from query to query.

Any help is much appreciated.

Cheers,
Steve :)
 
H

Heiko

Hello Steve
inspect the underlying SQL
Querydefs(<Name>).SQL and parse all after PARMETERS.
hth

Heiko
 
S

Steve

Heiko,

Thanks for the reply, but could you be a bit more specific?

I am new to Querydefs and do not understand what you mean.
(When I use debug.print qryd.SQL, I cannot see anything
refering to PARAMETERS)

Cheers,
Steve.
 
M

Marshall Barton

Steve said:
When setting parameters using QueryDefs.Parameters, is
there anyway of getting the required parameter name?

I am trying to get record counts from multiple queries,
with their names stored in a table, but the parameter can
vary from query to query.


Use the parameter object's Name property. E.g.

For Each prm In qdf.Parameters
Debug.Print prm.Name
Next
 

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