Use a parameter prompt with a crosstab query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a crosstab query which displays all training dates for all our teams.
I would like to copy this query and have a prompt to enter a team name so a
single team may be viewed at any given time.

I've checked the disscussion board but I dont really understand what I need
to do. Using select queries I just enter the promt text as criteria in [ ].
However I realise its not that simple with crosstabe queries.

Please help me and please remember I am a novice.

Ian
 
First thing, with a crosstab query you MUST declare your parameters and if
any
other queries are used in the crosstab their parameters must also be
declared.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Select the data type of the parameter in column 2
 
Hi, Ian.

You need to explicitly define the parameters in a crosstab query. Open the
query in Design View, then select the Query -> View menu to open the Query
Parameters dialog window. Enter the following:

Parameter: Data type:
[Enter Team Name:] Text

Close the Query Parameters dialog window. In the query grid, enter the
following criteria for the field for the team's name:

Criteria: LIKE "*" & [Enter Team Name:] & "*"

Save the query and run it. For more information on building crosstab
queries, please use the link to Tom Wickerath's step-by-step crosstab query
tutorial located on the following Web page:

http://www.Access.QBuilt.com/html/articles.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
Thats awesome thanks very much it worked first time. I was worried it was
going to be difficult.

Thanks again

Ian

'69 Camaro said:
Hi, Ian.

You need to explicitly define the parameters in a crosstab query. Open the
query in Design View, then select the Query -> View menu to open the Query
Parameters dialog window. Enter the following:

Parameter: Data type:
[Enter Team Name:] Text

Close the Query Parameters dialog window. In the query grid, enter the
following criteria for the field for the team's name:

Criteria: LIKE "*" & [Enter Team Name:] & "*"

Save the query and run it. For more information on building crosstab
queries, please use the link to Tom Wickerath's step-by-step crosstab query
tutorial located on the following Web page:

http://www.Access.QBuilt.com/html/articles.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.


NoviceIan said:
Hi,

I have a crosstab query which displays all training dates for all our teams.
I would like to copy this query and have a prompt to enter a team name so a
single team may be viewed at any given time.

I've checked the disscussion board but I dont really understand what I need
to do. Using select queries I just enter the promt text as criteria in [ ].
However I realise its not that simple with crosstabe queries.

Please help me and please remember I am a novice.

Ian
 
You're very welcome. Since it helped you, please consider marking that post
as an answer (not this one) so that others can easily and quickly find the
same answer in a search through the knowledge base of answers here:

http://www.microsoft.com/office/com...S&guid=&sloc=en-us&dg=microsoft.public.access

Thanks! It's much appreciated.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.


NoviceIan said:
Thats awesome thanks very much it worked first time. I was worried it was
going to be difficult.

Thanks again

Ian

'69 Camaro said:
Hi, Ian.

You need to explicitly define the parameters in a crosstab query. Open
the
query in Design View, then select the Query -> View menu to open the
Query
Parameters dialog window. Enter the following:

Parameter: Data type:
[Enter Team Name:] Text

Close the Query Parameters dialog window. In the query grid, enter the
following criteria for the field for the team's name:

Criteria: LIKE "*" & [Enter Team Name:] & "*"

Save the query and run it. For more information on building crosstab
queries, please use the link to Tom Wickerath's step-by-step crosstab
query
tutorial located on the following Web page:

http://www.Access.QBuilt.com/html/articles.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message
will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the
question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember
that
questions answered the quickest are often from those who have a history
of
rewarding the contributors who have taken the time to answer questions
correctly.


NoviceIan said:
Hi,

I have a crosstab query which displays all training dates for all our
teams.
I would like to copy this query and have a prompt to enter a team name
so a
single team may be viewed at any given time.

I've checked the disscussion board but I dont really understand what I
need
to do. Using select queries I just enter the promt text as criteria in
[ ].
However I realise its not that simple with crosstabe queries.

Please help me and please remember I am a novice.

Ian
 

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

Back
Top