A
AccessKay
Not sure if anyone knows the answer to this but I welcome any suggestions for
things to try. I have a crosstab query layered off of a Union query. I also
have a form with a text box for the user to choose the year and a command
button that pulls the report. It works fine if I choose the year 2009 or
earlier but if I choose 2010 I receive an error message, “…database engine
does not recognize “ as a valid field name or expression. I have not a clue
as to what is happening.
Thanks for any suggestions.
Here’s my query…if this helps any.
PARAMETERS [Forms]![frmQtr]![txtEnterYr] Text ( 255 );
TRANSFORM Sum(zqryforTotalsQTR.SumOfLbr_Total_Cost) AS
SumOfSumOfLbr_Total_Cost
SELECT zqryforTotalsQTR.Category, zqryforTotalsQTR.DGroup,
Format([TransDate],"yyyy") AS DYear,
Sum(zqryforTotalsQTR.SumOfLbr_Total_Cost) AS [Total Of SumOfLbr_Total_Cost]
FROM zqryforTotalsQTR
WHERE (((Format([TransDate],"yyyy"))=[Forms]![frmQtr]![txtEnterYr]))
GROUP BY zqryforTotalsQTR.Category, zqryforTotalsQTR.DGroup,
Format([TransDate],"yyyy")
PIVOT "Qtr " & Format([TransDate],"q");
things to try. I have a crosstab query layered off of a Union query. I also
have a form with a text box for the user to choose the year and a command
button that pulls the report. It works fine if I choose the year 2009 or
earlier but if I choose 2010 I receive an error message, “…database engine
does not recognize “ as a valid field name or expression. I have not a clue
as to what is happening.
Thanks for any suggestions.
Here’s my query…if this helps any.
PARAMETERS [Forms]![frmQtr]![txtEnterYr] Text ( 255 );
TRANSFORM Sum(zqryforTotalsQTR.SumOfLbr_Total_Cost) AS
SumOfSumOfLbr_Total_Cost
SELECT zqryforTotalsQTR.Category, zqryforTotalsQTR.DGroup,
Format([TransDate],"yyyy") AS DYear,
Sum(zqryforTotalsQTR.SumOfLbr_Total_Cost) AS [Total Of SumOfLbr_Total_Cost]
FROM zqryforTotalsQTR
WHERE (((Format([TransDate],"yyyy"))=[Forms]![frmQtr]![txtEnterYr]))
GROUP BY zqryforTotalsQTR.Category, zqryforTotalsQTR.DGroup,
Format([TransDate],"yyyy")
PIVOT "Qtr " & Format([TransDate],"q");