Prev: Query input value to determine another field results
Next: Sorting misc text into new fields if data exists in record update
From: thewabit via AccessMonster.com on 23 Jan 2010 21:28 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 23 Jan 2010 21:35 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 24 Jan 2010 00:16
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 |