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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|