Re: How can i pass a parameter to crosstab query
From: Rick Brandt (rickbrandt2_at_hotmail.com)
Date: 01/13/05
- Next message: BobbyOH: "Concatenate Data from same fields from different records"
- Previous message: Iman: "Append Querys into a query"
- In reply to: megeorge: "Re: How can i pass a parameter to crosstab query"
- Next in thread: megeorge: "Re: How can i pass a parameter to crosstab query"
- Reply: megeorge: "Re: How can i pass a parameter to crosstab query"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 18:25:27 -0600
megeorge wrote:
> John, Thanks for responding. No I understood Duanes response. I have
> the parameters declared as you all have instructed. When I run the
> query it prompts me for the value for the parameter. for example one
> of the parameters is for a forecast id. I want the user to first
> select a valid forecast id from a drop down list on a form. then use
> that value in the parameter for the cross tab query.
No, you still don't understand. You seem to be making the assumption that a
"parameter" in a query is something that prompts you for input when the query is
run and you want to eliminate that and use a form reference instead. What the
previous responders have been attempting to make you understand is that a form
reference is also a parameter (just a different kind).
In the following query...
SELECT * FROM SomeTable
WHERE SomeField = Forms!SomeForm!SomeControl
...the string "Forms!SomeForm!SomeControl" is considered a parameter. It is
just not a self-prompting parameter like what you are thinking of. Most queries
in Access will use such a parameter without you having to explicitly go into the
parameters dialog of the query and make an entry. The parameter is just
resolved on the fly.
A crosstab query is a bit more stubborn and insists that all parameters be
explicitly listed in the parameters dialog. So if I wanted to use the above
form reference in a crosstab query I would have to open the parameters list and
enter "Forms!SomeForm!SomeControl" as a parameter and indicate the DataType.
-- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com
- Next message: BobbyOH: "Concatenate Data from same fields from different records"
- Previous message: Iman: "Append Querys into a query"
- In reply to: megeorge: "Re: How can i pass a parameter to crosstab query"
- Next in thread: megeorge: "Re: How can i pass a parameter to crosstab query"
- Reply: megeorge: "Re: How can i pass a parameter to crosstab query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|