absolute value

R

RobertM

Hello:

I've got the following IIf statement:

AmtOfLoss:
IIf([QryClassActRpt.VarWComm]>=0,"N/A",Format([QryClassActRpt.VarWComm],"Currency"))

If gives a negative value, which is what the database is supposed to do. My
dept director wants to see positive values for one report. Please tell me
what I need to add here.

Thank you,

Robert
 
P

Phil

RobertM said:
Hello:

I've got the following IIf statement:

AmtOfLoss:
IIf([QryClassActRpt.VarWComm]>=0,"N/A",Format([QryClassActRpt.VarWComm],"Currency"))

If gives a negative value, which is what the database is supposed to do. My
dept director wants to see positive values for one report. Please tell me
what I need to add here.

Thank you,

Robert
So, all this does is give yuo teh negative values, (otherise it gives
you "N/A", and you want to flip them?
IIf([QryClassActRpt.VarWComm]>=0,"N/A",Format(([QryClassActRpt.VarWComm]*(-1)),"Currency"))
 
J

John Spencer

Use the abs function for that report.

IIf([QryClassActRpt.VarWComm]>=0,"N/A",
Format(Abs([QryClassActRpt.VarWComm]),"Currency"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top