R
Rene Hernandez
Good morning,
I am attempting to use the following in a query:
Score HousCount: Val(IIf(IsNumeric([SPM Housekeeping].[Score A]),Count([SPM
Housekeeping].[Score A]),0)+IIf(IsNumeric([SPM Housekeeping].[Score
B]),Count([SPM Housekeeping].[Score B]),0)+IIf(IsNumeric([SPM
Housekeeping].[Score C]),Count([SPM Housekeeping].[Score
C]),0)+IIf(IsNumeric([SPM Housekeeping].[Score D]),Count([SPM
Housekeeping].[Score D]),0)+IIf(IsNumeric([SPM Housekeeping].[Score
E]),Count([SPM Housekeeping].[Score E]),0)+IIf(IsNumeric([SPM
Housekeeping].[Score F]),Count([SPM Housekeeping].[Score F]),0))
When i use this in a form or report, it works and returns the total count of
records that are not null. For instance, it returns 5 if Scores A thru E
contain values, omitting Score F for being null. It returns 4 if Scores A
thru D contain values, omitting Scores E and F for being null, etc.
When i insert it into a query, it gives me the following message:
You tried to execute a query that does not include the specified expression
'EvaluationID' as part of an aggregate function.
The above are all text fields, i'm using XP, MS Access 2003.
Please help. Thanks.
I am attempting to use the following in a query:
Score HousCount: Val(IIf(IsNumeric([SPM Housekeeping].[Score A]),Count([SPM
Housekeeping].[Score A]),0)+IIf(IsNumeric([SPM Housekeeping].[Score
B]),Count([SPM Housekeeping].[Score B]),0)+IIf(IsNumeric([SPM
Housekeeping].[Score C]),Count([SPM Housekeeping].[Score
C]),0)+IIf(IsNumeric([SPM Housekeeping].[Score D]),Count([SPM
Housekeeping].[Score D]),0)+IIf(IsNumeric([SPM Housekeeping].[Score
E]),Count([SPM Housekeeping].[Score E]),0)+IIf(IsNumeric([SPM
Housekeeping].[Score F]),Count([SPM Housekeeping].[Score F]),0))
When i use this in a form or report, it works and returns the total count of
records that are not null. For instance, it returns 5 if Scores A thru E
contain values, omitting Score F for being null. It returns 4 if Scores A
thru D contain values, omitting Scores E and F for being null, etc.
When i insert it into a query, it gives me the following message:
You tried to execute a query that does not include the specified expression
'EvaluationID' as part of an aggregate function.
The above are all text fields, i'm using XP, MS Access 2003.
Please help. Thanks.