Re: IIf dilemma
- From: BCS <BCS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 19 Oct 2008 14:53:01 -0700
John, Here is the SQL.....
SELECT [Eval Data - Instructor].LastName, [Eval Data - Instructor].Course,
[Eval Data - Instructor].Section, [Eval Data - Instructor].StartDate,
Class.Cost, Class.CostAdjust, Class.CurrentEnrollment,
IIf([State]="Delivery",([Cost]+[CostAdjust])*[CurrentEnrollment],([Cost]+[CostAdjust])*[CurrentEnrollment]/2) AS [Class Cost]
FROM Class INNER JOIN [Eval Data - Instructor] ON Class.Section = [Eval Data
- Instructor].Section
GROUP BY [Eval Data - Instructor].LastName, [Eval Data - Instructor].Course,
[Eval Data - Instructor].Section, [Eval Data - Instructor].StartDate,
Class.Cost, Class.CostAdjust, Class.CurrentEnrollment
ORDER BY [Eval Data - Instructor].LastName;
The error message I received is......"You tried to execute a query that did
not include the specified expression
'IIf([State]="Delivery",([Cost]+[CostAdjust])+[CurrentEnrollment],([Cost]+[CostAdjust])*[CurrentEnrollment]/2)' as part of an aggregate function"
Thank you for any assistance you can give me!!!
"John Spencer" wrote:
POST the SQL of the query you are having a problem with AND the text of.
the error message.
(Menu: VIEW: SQL when in design view)
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
BCS wrote:
John - Thank you so much...I did not receive an error message w/this syntax!!
However, I may have another problem. When I tried to run the report, I
received an error message that essentially said my query 'did not include the
specified expression.' Basically, I'm trying to execute a query that
provides $ for each instructor that 'delivers' (teaches) and sometimes there
are 2 instructors for each 'delivery.' The report ran fine until I tried to
include this portion (w/the IIf) that includes 2 instructors for each
'delivery.' (Hope that makes sense)
Any insight would be much appreciated!
- Follow-Ups:
- Re: IIf dilemma
- From: John Spencer
- Re: IIf dilemma
- References:
- IIf dilemma
- From: BCS
- RE: IIf dilemma
- From: Jerry Whittle
- RE: IIf dilemma
- From: BCS
- Re: IIf dilemma
- From: John Spencer
- Re: IIf dilemma
- From: BCS
- Re: IIf dilemma
- From: John Spencer
- IIf dilemma
- Prev by Date: Re: desperately seeking latest date sort
- Next by Date: Update Query question
- Previous by thread: Re: IIf dilemma
- Next by thread: Re: IIf dilemma
- Index(es):
Relevant Pages
|