Results 1 to 2 of 2
  1. #1
    mcahal is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    East Texas

    Calculated Total with beginning Value

    Hi, I have a database to keep track of bus drivers' points. For any negative actions, they have points taken away, for any positive, they have points added (I wish this would work for my kids...).

    But now, instead of just coming to a maximum of 30 points before letting that driver go, HR wants it to be more positive.

    I had the expression:
    Total: IIf([TotalPointsForOffense]>0,IIf([TotalPointsGiven]>0,[TotalPointsForOffense]-[TotalPointsGiven],[TotalPointsForOffense]),[TotalPointsGiven])

    This added up all the offense points and subtracted out the given points.

    I changed that to:
    Total: IIf([TotalPointsForOffense]>0,IIf([TotalPointsGiven]>0,[TotalPointsGiven]-[TotalPointsForOffense],[TotalPointsForOffense]),[TotalPointsGiven])

    So now the negative is subtracted from the total with the positives added.

    My dilemma is that we need to start from 95. For example, a driver has 95 points and had a wreck which removed 20 points, ending in 75 points.

    Is there a way to modify the last expression with a beginning quantity?

    Thank you,

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    How about

    Total: 95 - IIf(...)

    or + if the calculation would result in a negative.
    Paul (wino moderator)
    MS Access MVP 2007-2019

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

Similar Threads

  1. Replies: 5
    Last Post: 10-17-2011, 02:53 PM
  2. Beginning and balances in Access 2007
    By jalovingood in forum Access
    Replies: 1
    Last Post: 04-19-2011, 03:34 PM
  3. Beginning and End of Filter
    By injanib in forum Forms
    Replies: 1
    Last Post: 03-24-2011, 02:01 AM
  4. Beginning Design Help
    By GenericHbomb in forum Database Design
    Replies: 30
    Last Post: 08-20-2010, 09:41 AM
  5. Calculating Beginning and Ending page numbers
    By sabraham in forum Access
    Replies: 3
    Last Post: 01-07-2010, 12:36 PM

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