Thursday, March 8, 2012

Adp sql - help

Hi,

Does anybody knows how to re-write this access sql into access adp query? Access adp does not seem to recognise the WHERE statement where is refers to other forms. Also applies to the IIF statement??
Please help..... Thanks.

Ms Access query (mdb):
---------
SELECT billing.[Job No], IIf([CountAFE]>1,"Multiple",[FirstOfAFE No]) AS [AFE No]
FROM ([Job-2] INNER JOIN billing ON [Job-2].[Job No] = billing.[Job No]) INNER JOIN [JOB COST-Query1 Sub] ON [Job-2].[Job No] = [JOB COST-Query1 Sub].[Job No]
WHERE (((billing.[Job No])=[Forms]![frmJobCostReport]![JobNumber]));Create a stored procedure
Pass the value of your control as an input parameter|||Try (case when) to replace (IIf).

IIF(condition, result1,result2)
is equivalent to:
CASE WHEN [condintion] THEN [result1] ELSE [result2] END

Good luck!

No comments:

Post a Comment