A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Parameter Value in Crosstab Query



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2009, 03:35 PM posted to microsoft.public.access.queries
NEWER USER
external usenet poster
 
Posts: 68
Default Parameter Value in Crosstab Query

I created a Select Query using a Parameter Value defined in my criteria
[Enter Group Number]. The records are retrieved when query runs. Now...

I take that query and build a Crosstab query using my select query as the
criteria. When it runs, I get an error message that [Enter Group Number] is
not recognized as a valid field name or expression. Are Parameter Values
allowed in Crosstab queries? Any help to steer me in the right direction is
appreciated.
  #2  
Old December 16th, 2009, 04:01 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Parameter Value in Crosstab Query

Recent versions of Access have become very picky with parameters and crosstabs.

Have you defined the [Enter Group Number] parameter data type specifically?
If so the SQL view of the initial query should look something like:

PARAMETERS [Enter Group Number] Integer;
SELECT tblDates.*
FROM tblDates
WHERE GroupNumber = [Enter Group Number];
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"NEWER USER" wrote:

I created a Select Query using a Parameter Value defined in my criteria
[Enter Group Number]. The records are retrieved when query runs. Now...

I take that query and build a Crosstab query using my select query as the
criteria. When it runs, I get an error message that [Enter Group Number] is
not recognized as a valid field name or expression. Are Parameter Values
allowed in Crosstab queries? Any help to steer me in the right direction is
appreciated.

  #3  
Old December 16th, 2009, 04:27 PM posted to microsoft.public.access.queries
Dale Fye
external usenet poster
 
Posts: 2,651
Default Parameter Value in Crosstab Query

In addition to defining it in the original query (as Jerry mentioned), you
may also need to define it explicitly in the crosstab query.

----
HTH
Dale



"Jerry Whittle" wrote:

Recent versions of Access have become very picky with parameters and crosstabs.

Have you defined the [Enter Group Number] parameter data type specifically?
If so the SQL view of the initial query should look something like:

PARAMETERS [Enter Group Number] Integer;
SELECT tblDates.*
FROM tblDates
WHERE GroupNumber = [Enter Group Number];
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"NEWER USER" wrote:

I created a Select Query using a Parameter Value defined in my criteria
[Enter Group Number]. The records are retrieved when query runs. Now...

I take that query and build a Crosstab query using my select query as the
criteria. When it runs, I get an error message that [Enter Group Number] is
not recognized as a valid field name or expression. Are Parameter Values
allowed in Crosstab queries? Any help to steer me in the right direction is
appreciated.

  #4  
Old December 16th, 2009, 04:36 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Parameter Value in Crosstab Query

NEWER USER wrote:

I created a Select Query using a Parameter Value defined in my criteria
[Enter Group Number]. The records are retrieved when query runs. Now...

I take that query and build a Crosstab query using my select query as the
criteria. When it runs, I get an error message that [Enter Group Number] is
not recognized as a valid field name or expression. Are Parameter Values
allowed in Crosstab queries? Any help to steer me in the right direction is
appreciated.



Yes, you can, but, in crosstab queries, the parameters must
be declared:

PARAMETERS [Enter Group Number] INTEGER;
SELECT . . .

--
Marsh
MVP [MS Access]
  #5  
Old December 16th, 2009, 05:51 PM posted to microsoft.public.access.queries
NEWER USER
external usenet poster
 
Posts: 68
Default Parameter Value in Crosstab Query

Thanks for ALL the help guys...Happy Holidays!

"Marshall Barton" wrote:

NEWER USER wrote:

I created a Select Query using a Parameter Value defined in my criteria
[Enter Group Number]. The records are retrieved when query runs. Now...

I take that query and build a Crosstab query using my select query as the
criteria. When it runs, I get an error message that [Enter Group Number] is
not recognized as a valid field name or expression. Are Parameter Values
allowed in Crosstab queries? Any help to steer me in the right direction is
appreciated.



Yes, you can, but, in crosstab queries, the parameters must
be declared:

PARAMETERS [Enter Group Number] INTEGER;
SELECT . . .

--
Marsh
MVP [MS Access]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.