From: thewabit via AccessMonster.com on
I am frustrated with this one...

I have a crosstab query used to display results on a graph. I want to filter
"risklevel" depending on what is selected in a combobox using a value list.
When I put in the filter and run the query, I get the error "The Microsoft
Jet Database Engine does not recognize [Forms]![frmLOSA_Chart_Trend]![risk]
as a valid field name or expression"

Here is the SQL....

TRANSFORM Sum(qryLOSATrend_Risk.RiskLevelQTY) AS SumOfRiskLevelQTY
SELECT qryLOSATrend_Risk.OBMonth
FROM qryLOSATrend_Risk
WHERE (((qryLOSATrend_Risk.RiskLevel)=[Forms]![frmLOSA_Chart_Trend]![risk]))
GROUP BY qryLOSATrend_Risk.OBMonth
PIVOT qryLOSATrend_Risk.RiskLevel;


Thanks!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201001/1

From: Duane Hookom on
You must specify the data type of your parameters in a crosstab query.
Select Query->Parameters and enter:
[Forms]![frmLOSA_Chart_Trend]![risk] (the data type here)

Duane Hookom
MS Access MVP

"thewabit via AccessMonster.com" <u57141(a)uwe> wrote in message
news:a291730fafcb9(a)uwe...
> I am frustrated with this one...
>
> I have a crosstab query used to display results on a graph. I want to
> filter
> "risklevel" depending on what is selected in a combobox using a value
> list.
> When I put in the filter and run the query, I get the error "The Microsoft
> Jet Database Engine does not recognize
> [Forms]![frmLOSA_Chart_Trend]![risk]
> as a valid field name or expression"
>
> Here is the SQL....
>
> TRANSFORM Sum(qryLOSATrend_Risk.RiskLevelQTY) AS SumOfRiskLevelQTY
> SELECT qryLOSATrend_Risk.OBMonth
> FROM qryLOSATrend_Risk
> WHERE
> (((qryLOSATrend_Risk.RiskLevel)=[Forms]![frmLOSA_Chart_Trend]![risk]))
> GROUP BY qryLOSATrend_Risk.OBMonth
> PIVOT qryLOSATrend_Risk.RiskLevel;
>
>
> Thanks!
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201001/1
>
From: thewabit via AccessMonster.com on
Who in the heck makes these rules!? Us beginners don't have a chance. I would
have never figured that out.

Thanks Duane...works great!

Duane Hookom wrote:
>You must specify the data type of your parameters in a crosstab query.
>Select Query->Parameters and enter:
> [Forms]![frmLOSA_Chart_Trend]![risk] (the data type here)
>
>Duane Hookom
>MS Access MVP
>
>> I am frustrated with this one...
>>
>[quoted text clipped - 18 lines]
>>
>> Thanks!

--
Message posted via http://www.accessmonster.com