Nested parameter query

G

Guest

Is there a limit to the number of nested queries that can reference a
parameter?

I have a series of 5 queries that I use for various levels of analytic
detail. The first of these queries has a parameter defined, and works great.
Each of the successive levels of detail refers to the previous query (query2
refers to query1, ..., and query 5 refers to query4).

When I run query 4 I get a single prompt for my parameter, but whey I run
query5, the parameter prompt box comes up twice instead of just once. I have:

1. modified the queries so that the parameter is only defined in the first
query, and that it is not reference in any criteria or parameter statements
in any of the other queries, no change
2. modified the queries so that the parameter is defined in each subsequent
query, this does not change the outcome either

Dale
 
A

Amy Blankenship

What type of query are they? I've had a similar experience with union
queries. My solution was just to keep playing with the query until the
extra parameter call went away.
 
G

Guest

They are all simple select queries.

If I cannot fix this with about a half hours work, I'll just create an input
form.


--
Email address is not valid.
Please reply to newsgroup only.


Amy Blankenship said:
What type of query are they? I've had a similar experience with union
queries. My solution was just to keep playing with the query until the
extra parameter call went away.
 
M

Marshall Barton

Dale said:
Is there a limit to the number of nested queries that can reference a
parameter?

I have a series of 5 queries that I use for various levels of analytic
detail. The first of these queries has a parameter defined, and works great.
Each of the successive levels of detail refers to the previous query (query2
refers to query1, ..., and query 5 refers to query4).

When I run query 4 I get a single prompt for my parameter, but whey I run
query5, the parameter prompt box comes up twice instead of just once. I have:

1. modified the queries so that the parameter is only defined in the first
query, and that it is not reference in any criteria or parameter statements
in any of the other queries, no change
2. modified the queries so that the parameter is defined in each subsequent
query, this does not change the outcome either


Query parameter prompts are only a quick and dirty way to
get parameter vaalues into a query. Far better is to create
a form with (text box) controls for the parameter values.
This way the parameters in the query would by something
like:
Forms![name of form].[name of control]
and, as long as the form is open, it wouldn't matter where
the parameter is used.
 
A

Amy Blankenship

Depends on what you're doing with it. If you're calling it from outside
access, that's not an option.

Marshall Barton said:
Dale said:
Is there a limit to the number of nested queries that can reference a
parameter?

I have a series of 5 queries that I use for various levels of analytic
detail. The first of these queries has a parameter defined, and works
great.
Each of the successive levels of detail refers to the previous query
(query2
refers to query1, ..., and query 5 refers to query4).

When I run query 4 I get a single prompt for my parameter, but whey I run
query5, the parameter prompt box comes up twice instead of just once. I
have:

1. modified the queries so that the parameter is only defined in the
first
query, and that it is not reference in any criteria or parameter
statements
in any of the other queries, no change
2. modified the queries so that the parameter is defined in each
subsequent
query, this does not change the outcome either


Query parameter prompts are only a quick and dirty way to
get parameter vaalues into a query. Far better is to create
a form with (text box) controls for the parameter values.
This way the parameters in the query would by something
like:
Forms![name of form].[name of control]
and, as long as the form is open, it wouldn't matter where
the parameter is used.
 
M

Marshall Barton

If a query is being executed by anything other than Access,
there will be no parameter prompting either.
--
Marsh
MVP [MS Access]


Amy said:
Depends on what you're doing with it. If you're calling it from outside
access, that's not an option.

"Marshall Barton" wrote
Dale said:
Is there a limit to the number of nested queries that can reference a
parameter?

I have a series of 5 queries that I use for various levels of analytic
detail. The first of these queries has a parameter defined, and works
great.
Each of the successive levels of detail refers to the previous query
(query2
refers to query1, ..., and query 5 refers to query4).

When I run query 4 I get a single prompt for my parameter, but whey I run
query5, the parameter prompt box comes up twice instead of just once. I
have:

1. modified the queries so that the parameter is only defined in the
first
query, and that it is not reference in any criteria or parameter
statements
in any of the other queries, no change
2. modified the queries so that the parameter is defined in each
subsequent
query, this does not change the outcome either


Query parameter prompts are only a quick and dirty way to
get parameter vaalues into a query. Far better is to create
a form with (text box) controls for the parameter values.
This way the parameters in the query would by something
like:
Forms![name of form].[name of control]
and, as long as the form is open, it wouldn't matter where
the parameter is used.
 
A

Amy Blankenship

LOL. But the parameters still need to be passed.

Marshall Barton said:
If a query is being executed by anything other than Access,
there will be no parameter prompting either.
--
Marsh
MVP [MS Access]


Amy said:
Depends on what you're doing with it. If you're calling it from outside
access, that's not an option.

"Marshall Barton" wrote
Dale Fye wrote:

Is there a limit to the number of nested queries that can reference a
parameter?

I have a series of 5 queries that I use for various levels of analytic
detail. The first of these queries has a parameter defined, and works
great.
Each of the successive levels of detail refers to the previous query
(query2
refers to query1, ..., and query 5 refers to query4).

When I run query 4 I get a single prompt for my parameter, but whey I
run
query5, the parameter prompt box comes up twice instead of just once. I
have:

1. modified the queries so that the parameter is only defined in the
first
query, and that it is not reference in any criteria or parameter
statements
in any of the other queries, no change
2. modified the queries so that the parameter is defined in each
subsequent
query, this does not change the outcome either


Query parameter prompts are only a quick and dirty way to
get parameter vaalues into a query. Far better is to create
a form with (text box) controls for the parameter values.
This way the parameters in the query would by something
like:
Forms![name of form].[name of control]
and, as long as the form is open, it wouldn't matter where
the parameter is used.
 

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