View Single Post
  #3  
Old June 7th, 2010, 09:13 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default in access, if then statement

You have the same names as calculated fields and fields that you are joining
tables on.
Which do you want to use in the IIF stateement?

--
Build a little, test a little.


"dtretina" wrote:

if (Escalation/Assignment = 0) or (Updateheat = 0 )or (Worklog = 0), then 0
for the total. Else total.

How would you set this up in design query? Each of the above is a seperate
table

Query:
SELECT DISTINCTROW tblMonitoringData_OLD.[HEAT ID],
[tblEscalation/Assignment]![Points Earned]+tblUpdateHeat![Points
Earned]+tblWorklog![Points Earned] AS [Documenation Pts],
[tblEscalation/Assignment].[Points Earned] AS [Escalation?Assign],
tblUpdateHeat.[Points Earned] AS UpdateHeat, tblWorklog.[Points Earned] AS
Worklog
FROM ((tblMonitoringData_OLD LEFT JOIN [tblEscalation/Assignment] ON
tblMonitoringData_OLD.[Escalation/Assignment] =
[tblEscalation/Assignment].ID) LEFT JOIN tblUpdateHeat ON
tblMonitoringData_OLD.UpdateHeat = tblUpdateHeat.ID) LEFT JOIN tblWorklog ON
tblMonitoringData_OLD.Worklog = tblWorklog.ID
GROUP BY tblMonitoringData_OLD.[HEAT ID], [tblEscalation/Assignment].[Points
Earned], tblUpdateHeat.[Points Earned], tblWorklog.[Points Earned];