L
Lori
Okay, I have a query that joins three tables. This query looks at several
fields and adds them, simple enough but whenever I view the query it asks for
the parameters for each of the fields where I've imput an expression. The end
result is always right but how do I stop it from popping up with the
parameter request for each field?
Below is the SQL view of this query. I hope someone can give me a simple
answer to stop this.
Thanks:
SELECT [PFC Table].PFCID, [PFC Table].[Project #], [PFC Table].[Cost Code],
[PFC Table].Trade, [Subcontract Status1].[ScopeChange?], IIf(([Subcontract
Status Details]![Change Value]<>0),(0),([Original Budget])) AS Original,
IIf(([ScopeChange?]=-1),([Subcontract Status Details]![Change Value]),(0)) AS
[Approved Revisions], ([Original]+[Approved Revisions]) AS [Revised Budget],
[Subcontract Status Details].Value, IIf(([Subcontract Status Details]![Change
Value]<>0),([Subcontract Status Details]![Change Value]),(0)) AS Change,
IIf(([Subcontract Status Details]![ScopeChange]=-1),([Subcontract Status
Details]![Value]),([Subcontract Status Details]![Value]+[Subcontract Status
Details]![ScopeChange])) AS [Committed Original], IIf(([Committed
Original]>[Original]),(0),([Original]-[Committed Original])) AS [TBC
Original], ([Approved Revisions]) AS [Committed Revisions], (0) AS [TBC
Revisions], ([Committed Original]+[TBC Original]+[Committed Revisions]+[TBC
Revisions]) AS [Projected Final Cost], ([Revised Budget]-[Projected Final
Cost]) AS [Savings/(Overrun)]
FROM [PFC Table] INNER JOIN ([Subcontract Status1] INNER JOIN [Subcontract
Status Details] ON [Subcontract Status1].SUBID = [Subcontract Status
Details].SUBID) ON [PFC Table].[Cost Code] = [Subcontract Status
Details].[Cost Code]
GROUP BY [PFC Table].PFCID, [PFC Table].[Project #], [PFC Table].[Cost
Code], [PFC Table].Trade, [Subcontract Status1].[ScopeChange?],
IIf(([Subcontract Status Details]![Change Value]<>0),(0),([Original
Budget])), IIf(([ScopeChange?]=-1),([Subcontract Status Details]![Change
Value]),(0)), ([Original]+[Approved Revisions]), [Subcontract Status
Details].Value, IIf(([Subcontract Status Details]![Change
Value]<>0),([Subcontract Status Details]![Change Value]),(0)),
IIf(([Subcontract Status Details]![ScopeChange]=-1),([Subcontract Status
Details]![Value]),([Subcontract Status Details]![Value]+[Subcontract Status
Details]![ScopeChange])), IIf(([Committed
Original]>[Original]),(0),([Original]-[Committed Original])), ([Approved
Revisions]), (0), ([Committed Original]+[TBC Original]+[Committed
Revisions]+[TBC Revisions]), ([Revised Budget]-[Projected Final Cost])
ORDER BY [PFC Table].[Cost Code];
fields and adds them, simple enough but whenever I view the query it asks for
the parameters for each of the fields where I've imput an expression. The end
result is always right but how do I stop it from popping up with the
parameter request for each field?
Below is the SQL view of this query. I hope someone can give me a simple
answer to stop this.
Thanks:
SELECT [PFC Table].PFCID, [PFC Table].[Project #], [PFC Table].[Cost Code],
[PFC Table].Trade, [Subcontract Status1].[ScopeChange?], IIf(([Subcontract
Status Details]![Change Value]<>0),(0),([Original Budget])) AS Original,
IIf(([ScopeChange?]=-1),([Subcontract Status Details]![Change Value]),(0)) AS
[Approved Revisions], ([Original]+[Approved Revisions]) AS [Revised Budget],
[Subcontract Status Details].Value, IIf(([Subcontract Status Details]![Change
Value]<>0),([Subcontract Status Details]![Change Value]),(0)) AS Change,
IIf(([Subcontract Status Details]![ScopeChange]=-1),([Subcontract Status
Details]![Value]),([Subcontract Status Details]![Value]+[Subcontract Status
Details]![ScopeChange])) AS [Committed Original], IIf(([Committed
Original]>[Original]),(0),([Original]-[Committed Original])) AS [TBC
Original], ([Approved Revisions]) AS [Committed Revisions], (0) AS [TBC
Revisions], ([Committed Original]+[TBC Original]+[Committed Revisions]+[TBC
Revisions]) AS [Projected Final Cost], ([Revised Budget]-[Projected Final
Cost]) AS [Savings/(Overrun)]
FROM [PFC Table] INNER JOIN ([Subcontract Status1] INNER JOIN [Subcontract
Status Details] ON [Subcontract Status1].SUBID = [Subcontract Status
Details].SUBID) ON [PFC Table].[Cost Code] = [Subcontract Status
Details].[Cost Code]
GROUP BY [PFC Table].PFCID, [PFC Table].[Project #], [PFC Table].[Cost
Code], [PFC Table].Trade, [Subcontract Status1].[ScopeChange?],
IIf(([Subcontract Status Details]![Change Value]<>0),(0),([Original
Budget])), IIf(([ScopeChange?]=-1),([Subcontract Status Details]![Change
Value]),(0)), ([Original]+[Approved Revisions]), [Subcontract Status
Details].Value, IIf(([Subcontract Status Details]![Change
Value]<>0),([Subcontract Status Details]![Change Value]),(0)),
IIf(([Subcontract Status Details]![ScopeChange]=-1),([Subcontract Status
Details]![Value]),([Subcontract Status Details]![Value]+[Subcontract Status
Details]![ScopeChange])), IIf(([Committed
Original]>[Original]),(0),([Original]-[Committed Original])), ([Approved
Revisions]), (0), ([Committed Original]+[TBC Original]+[Committed
Revisions]+[TBC Revisions]), ([Revised Budget]-[Projected Final Cost])
ORDER BY [PFC Table].[Cost Code];