CrossTab Query problem

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

I am tyring to create a CrossTabb Query that is
fed by a regular query.
My regular query has a field with a criteria of
"Forms![frmMainMenu]![DefaultYear]"
And this query runs fine.

But when I run the Crosstab Query that is fed by this query
I get a error as follows
"The Microsoft Jet database engine does not recognize
'Forms![frmMainMenu]![DefaultYear]' as a valid field
name or expression.

Please Help
Thank You
 
You have to define parameters in a crosstab query like this --
PARAMETER [Forms]![frmMainMenu]![DefaultYear] TEXT 255
SELECT xx xx xxx

Is inserted before SELECT statement in the SQL view.
 
Thanks for the reply Karl,
I was trying to create it using the query grid.
The first Query would find the results and then
I would use that query to build my CrossTab.
But that doesn't work.
So I used your example and copied it into the
sql view. And Lo&Behold it worked.
Thank you.
But I don't understand why I cant use the query grid
which is infact what the help file reccomends as per below
Under "Create a select or crosstab query"

1.. Add the field you want to set criteria for to the design grid.

2.. Click Where in the Total cell.

3.. Leave the Crosstab cell blank.

4.. Enter an expression in the Criteria row.

Obviously this doesn't work.
The help file seems top be getting less & less "Helpful"

Thanks for your help Karl!


KARL DEWEY said:
You have to define parameters in a crosstab query like this --
PARAMETER [Forms]![frmMainMenu]![DefaultYear] TEXT 255
SELECT xx xx xxx

Is inserted before SELECT statement in the SQL view.

Jack said:
I am tyring to create a CrossTabb Query that is
fed by a regular query.
My regular query has a field with a criteria of
"Forms![frmMainMenu]![DefaultYear]"
And this query runs fine.

But when I run the Crosstab Query that is fed by this query
I get a error as follows
"The Microsoft Jet database engine does not recognize
'Forms![frmMainMenu]![DefaultYear]' as a valid field
name or expression.

Please Help
Thank You
 
The help file seems top be getting less & less "Helpful"
Concur.

Jack said:
Thanks for the reply Karl,
I was trying to create it using the query grid.
The first Query would find the results and then
I would use that query to build my CrossTab.
But that doesn't work.
So I used your example and copied it into the
sql view. And Lo&Behold it worked.
Thank you.
But I don't understand why I cant use the query grid
which is infact what the help file reccomends as per below
Under "Create a select or crosstab query"

1.. Add the field you want to set criteria for to the design grid.

2.. Click Where in the Total cell.

3.. Leave the Crosstab cell blank.

4.. Enter an expression in the Criteria row.

Obviously this doesn't work.
The help file seems top be getting less & less "Helpful"

Thanks for your help Karl!


KARL DEWEY said:
You have to define parameters in a crosstab query like this --
PARAMETER [Forms]![frmMainMenu]![DefaultYear] TEXT 255
SELECT xx xx xxx

Is inserted before SELECT statement in the SQL view.

Jack said:
I am tyring to create a CrossTabb Query that is
fed by a regular query.
My regular query has a field with a criteria of
"Forms![frmMainMenu]![DefaultYear]"
And this query runs fine.

But when I run the Crosstab Query that is fed by this query
I get a error as follows
"The Microsoft Jet database engine does not recognize
'Forms![frmMainMenu]![DefaultYear]' as a valid field
name or expression.

Please Help
Thank You
 

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