Help needed: Setting parameters in parameter queries 
Author Message
 Help needed: Setting parameters in parameter queries

I am trying to write a generic routine that sets parameters for parameter
queries (VB PE 3.0), because I want to do some centralized error handling
when a parameter is used in ocde but not defined in the query and

However, I cannot find a way passing the query parameter name as a

For instance:

I have a querydef called qd and it has a parameter called par.
To set the value of this parameter I must write something like

        qd!par = "..."

But now I have a string variable, lets say sParameterName, which
contains "par", and I want to use it to set the querydef parameter.
So something like:

        qd(sParameterName) = "..."

It seems that there is no way to do this. Does anybody has a clue,
knows a solution or can give me a definite "no it can't" on this?

Erik Siegel

PS: Please CC an answer to me if you can.

Erik Siegel                     | Telephone: +31 50 855336
PTT Telecom BV                  | Telefax  : +31 50 855310

P.O. Box 188                    | DISCLAIMER: This statement is not an
NL-9700 AD Groningen            | statement from, nor does it represent
The Netherlands                 | official position of, PTT Telecom B.V.

Fri, 06 Feb 1998 03:00:00 GMT  
 Help needed: Setting parameters in parameter queries
Hallo Colleague!

I tried to do something like that. I tried to connect a
parameterquery(.mdb) to my data control and I was told that it
wasn't possible. So I used a query(mdb) which I connect with a
SQL statement in VB. This works fine. I didnt want to handle all
the errors if a wrong parameter was entered, but I tried it and
it worked, so now I use a default start and the user can change
it afterward. If you need some example code for the SQL-statement
I have a working one. Otherwise you can allways try the
searchengine at Carl&Gary.

Hope this help

Transmission engineer
Telia, South Region

Sat, 07 Feb 1998 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Help needed: Setting parameters in parameter queries

2. calling parameter query from a parameter query

3. Greenhorn needs Help On Recordset Parameter Query

4. Need help passing query parameters in a url

5. Need help with this WHERE clause in parameter query

6. Help with SQL parameter query needed!

7. Need Help passing Parameters to SQL query in a VB dataenviroment

8. Filling a Parameter through Code (Parameter Query)

9. Using Parameters from VBA Code in a Parameter Query Export

10. parameter query in VBA when parameter not a field

11. Using Parameter Queries with Optional Parameters

12. Parameter query w/ parameter specifying field name?


Powered by phpBB® Forum Software