Results 1 to 9 of 9
  1. #1
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28

    How to change a negative total (count or sum) to a positive one in a report

    Hi


    I have a report which is counting and totalling numbers, but in the numbers show as negatives - I need them to show as positives.

    I managed to change the total in one counting field to positive but I've forgotten how - or where I put the code....

    Can anyone help please?

    Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28
    Thank you - but I'm new to this - where would I put this Abs() function and what should it look like?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What is the significance of the negative numbers?
    What is the impact if you were to change them all to Positives?
    Without knowing the context of your situation, it is difficult to give focused info.

  5. #5
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28
    There would be no impact on anything else, the report is to basically count things - and therefore a negative is inappropriate.

    Thanks

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Why would counting result in negative?

    Look in the report RecordSource property. Is it table, query, or SQL statement? If one of the latter two open in design view and see if you can find the expression that worked. Otherwise, look at the ControlSource property of the textbox that has the corrected value. Is there an expression?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28
    it's counting the number of clients that use a particular service in a month for example.

    I seriously cannot find where/how I changed the first number from negative to positive. It's really just to make the report look nice and to stop people asking why it's a negative number.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Still doesn't explain why the value is negative to begin with. Expression using Count function will result in positive, expression with Sum function could be negative. However, use Abs() function to return positive whether or not negative. In query or textbox:

    Abs([fieldname])

    or

    Abs(some expression)

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    I agree with June7 -- Why is a count negative? I think you should investigate/step through code/ debug.print etc to find the root of the problem.

    Recommend you post your db as June7 suggested.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Positive to Negative
    By greek-autumn in forum Queries
    Replies: 3
    Last Post: 03-24-2013, 05:20 PM
  2. Replies: 7
    Last Post: 09-16-2011, 01:39 PM
  3. Converting Positive to Negative
    By TheProfessorIII in forum Access
    Replies: 5
    Last Post: 03-22-2011, 06:38 AM
  4. Summing Positive and Negative Currency
    By nweird in forum Reports
    Replies: 1
    Last Post: 07-22-2010, 10:05 AM
  5. Convert Negative Values to Positive
    By creativefusion in forum Queries
    Replies: 1
    Last Post: 10-21-2009, 02:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums