More Parameter help please :)

  • Thread starter Thread starter Steve
  • Start date Start date
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 :)
 
Hello Steve
inspect the underlying SQL
Querydefs(<Name>).SQL and parse all after PARMETERS.
hth

Heiko
 
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.
 
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
 
Back
Top