Sum of calculated fields... if they meet criteria???

Steff_DK

Registered User.
Local time
Today, 18:35
Joined
Feb 12, 2005
Messages
110
I have qryMyquery, based on tblMytable.

The query uses a function to calculate a value from tblMytable - [qryMyquery].[calc_value].

I want to sum all the [calc_value]s for records that meet the criterias of another select query to the same table - (SELECT... WHERE [tblMytable].[Data]="Criteria")

I'd prefer to have it nested in one and the same query - but how is this done?

I suspect this is done with IN() but I can't seem to find any post in this forum, when I search for IN...
 
Can you apply the criteria up front, in the calculated field?
Iif(x * x > y, x * x, 0)
Then sum them all.
 

Users who are viewing this thread

Back
Top Bottom