Budget is our income and sometimes this is positive. I need to make this
column in a query all negitive values.
I am using the IIf function but it is not working.
Budget: [budget_amount] IIf ([budget_amount] >=0, [budget_amount]*-1,
[budget_amount])
or is there another function I could use?
fredg said:
In a query?
Budget:IIf ([budget_amount] >=0, [budget_amount]*-1,
[budget_amount])
All values will be negative.
Fred
Thank you. Yes when i realised that i posted this in the report section, I
then posted it in the query section.
but still it does not work.
I dont know whats wrong.
I deleted what i had in the expression builder, coppied what you wrote and
pasted it directly in expression builder. for the "Field" row (and
subitiuted "budget" for "budget_amount").
ERROR: syntax error (comma) in query expression
'dbo_jobcactb.[IIf(budget_amount]>=0,[budget_amount]*-1,[budget_amount])]'.
(NOTE: "dbo_jobcactb" is the table that "Budget" comes from and the outside
[] is put in the error itself).
(NOTE: "Budget:" was just what i renamed the column from "budget_amount").
I have tried deleting the comma but still does not help.
Am i missing something somewhere?