parameter queries--too many of them!!! 
Author Message
 parameter queries--too many of them!!!

hi,

I'm developing an application that largely depends on parameter queries
(around 20 of them) that are usually based on a certain number a user
selects
from a combobox on one of 15 or so forms.  due to the nature of my data,
it is
stored in around 10 tables, many of which are one-to-many
relationships.  the
problem is that many of the actions the application does require
parameter
queries and using them in VBA means you first need to create a new query
and
the SQL statement has to be coded each time. then i run into two
problems:

coding those damn things over and over is a royal pain
and
each time you run the code, you must delete the query created last time
because otherwise you get a 'query already exists error' (and you can't
use
'stored' parameter queries--they need to be created 'on the fly'). the
problem
here is that the database becomes enormous because of the repeated
creation
and deletion of objects.

my database will be used at three different sites and i'm not sure that
hard
coding the compact will be very effective....it will be used by people
who
have never used access before.

thanks!!!!



Sat, 08 Jul 2000 03:00:00 GMT  
 parameter queries--too many of them!!!

Why do you need to create your parameter queries in code?  Do they having a
varying number of parameters or something, as if the parameters are static
you can just use stored queries.

Quote:

>hi,

>I'm developing an application that largely depends on parameter queries
>(around 20 of them) that are usually based on a certain number a user
>selects
>from a combobox on one of 15 or so forms.  due to the nature of my data,
>it is
>stored in around 10 tables, many of which are one-to-many
>relationships.  the
>problem is that many of the actions the application does require
>parameter
>queries and using them in VBA means you first need to create a new query
>and
>the SQL statement has to be coded each time. then i run into two
>problems:

>coding those damn things over and over is a royal pain
>and
>each time you run the code, you must delete the query created last time
>because otherwise you get a 'query already exists error' (and you can't
>use
>'stored' parameter queries--they need to be created 'on the fly'). the
>problem
>here is that the database becomes enormous because of the repeated
>creation
>and deletion of objects.

>my database will be used at three different sites and i'm not sure that
>hard
>coding the compact will be very effective....it will be used by people
>who
>have never used access before.

>thanks!!!!



Sat, 08 Jul 2000 03:00:00 GMT  
 parameter queries--too many of them!!!

If you're creating the queries for reports, check out the docs on the docmd.openreport function.  This has a parameter where you can pass the where clause (created in code) to a predefined query.

HTH,

Jeff

Quote:

>hi,

>I'm developing an application that largely depends on parameter queries
>(around 20 of them) that are usually based on a certain number a user
>selects
>from a combobox on one of 15 or so forms.  due to the nature of my data,
>it is
>stored in around 10 tables, many of which are one-to-many
>relationships.  the
>problem is that many of the actions the application does require
>parameter
>queries and using them in VBA means you first need to create a new query
>and
>the SQL statement has to be coded each time. then i run into two
>problems:

>coding those damn things over and over is a royal pain
>and
>each time you run the code, you must delete the query created last time
>because otherwise you get a 'query already exists error' (and you can't
>use
>'stored' parameter queries--they need to be created 'on the fly'). the
>problem
>here is that the database becomes enormous because of the repeated
>creation
>and deletion of objects.

>my database will be used at three different sites and i'm not sure that
>hard
>coding the compact will be very effective....it will be used by people
>who
>have never used access before.

>thanks!!!!



Sat, 08 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. calling parameter query from a parameter query

2. Filling a Parameter through Code (Parameter Query)

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

4. parameter query in VBA when parameter not a field

5. Using Parameter Queries with Optional Parameters

6. Parameter query w/ parameter specifying field name?

7. Help needed: Setting parameters in parameter queries

8. Help needed: Setting parameters in parameter queries

9. passing parameter to a parameter query

10. Passing Parameters to stored parameter queries using VB 5's Data Controls

11. Executing Parameter Query with 2 parameters

12. Use Parameter Queries in VBA- Then open as Recordset- collect values

 

 
Powered by phpBB® Forum Software