Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display a negative # as positive - Abs

Status
Not open for further replies.

bethabernathy

Programmer
Jul 13, 2001
254
0
0
MX
Hi - I have a query with a field named "othrsr", which returns both positive an negative numbers. I want to return all the negative numbers as positive. I try adding "Abs([othrsr])" into the criteria and that restricts the data set to only positive numbers is there a way in the query to turn all the negative numbers to positive? Or should I do it in a report? Any information is really appreciated.

Thanks, Beth beth@integratedresourcemgmt.com
 
I don't know about a function to do it, but in the old days (pre 90's) we used to multiply by -1 to convert to positive. if num < 0 then num = num * -1.
 
You have to put the expression into the grid Expr1:Abs([MyField]) or as the control source for a text box on your report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top