Results show as a minus. WHY?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an application that was developed by another developer using VB.net
which reside in a SQL table. I need to use some of the data from this table,
however the data shows as -0.5 or - 0.99 or -1.70 etc in my Access tables.
How can I get those numbers to show as a percentage with only one decimal
point to the left? Example: 3.6% or 31.4 %. Any help would be greatly
appreciated. No matter what I do it shows that dang "-" at the beginning.
 
You can use the Abs function to strip off the negative

Abs([YourTable].[YourField])

And you can format that as percentage either using the control's format
property or using the format function. Personnally I would use the format
property to control the display of the data and the Abs() function in the
underlying query

Field: YourField: Abs([YourTable].[YourField])

In some versions of Access you may not be able to alias the field to the
same name as the field. In most cases you can do so AS LONG AS you use the
Table and Field name when you want to refer to the field and not its alias.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top