Results 1 to 9 of 9
  1. #1
    Makyaarts is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    4

    Access IIF Formula Help

    I am a MS Access Newbe.

    Trying my hand at a Payroll.

    Can I please get help with an IIF Formula on a Payslip Form.

    FieldName is UIF.

    We have a Monthly Limit for Calculation UIF. Our UIF percentage is 1% but the Limit is 14800.00. Which means All GrossSalaries calculate 1% but as soon as the Salary is higher than 14800.00 only 148.00 will be charged.



    Current Formula is: UIF=IIf([UIFReg]=True,[GrossWage]*0.01,0) Works correctly.

    But the part of Grosswage >= 14800.00 must only be 148.00 I am not sure how to add.

    Will appreciate all info.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    So you need to calculate the SUM of each employee's wages for the month and if that SUM >= 14800, don't calculate UIF and/or calculate so doesn't exceed 148 for the month.


    Last edited by June7; 08-06-2019 at 01:11 AM.
    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.

  3. #3
    Makyaarts is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    4
    Quote Originally Posted by June7 View Post
    So you need to calculate the SUM of each employee's wages for the month and if that SUM >= 14800, don't calculate UIF and/or calculate so doesn't exceed 148 for the month.

    Think should write a custom VBA function to handle this.


    If have all the Salary Sums in place just need to get the UIF Calculated if the Salary is more than 14800.00. And yes for the rest you are correct.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Don't know your db structure nor buisness process so really can't advise more specific.
    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.

  5. #5
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Why not
    IIf([UIFReg] = True, IIf([GrossWage] < 148000, [GrossWage] * 0.01, 148), 0)

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I was assuming GrossWage was just for the current payperiod, not the entire month. Are payperiods weekly, biweekly, semi-monthly, monthly? If paid every 2 weeks, how should 'monthly' amount be determined?
    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
    Makyaarts is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    4
    I have Weekly, Bi-weekly and Monthly Pay Periods, but the Monthly Period is the only period where Salaries go over 14800.

  8. #8
    Makyaarts is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    4
    Works like a charm. Thank You

  9. #9
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    You are welcome!

    Happy to help!

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

Similar Threads

  1. I need an if then formula in Access
    By tmccasland in forum Access
    Replies: 6
    Last Post: 09-27-2018, 06:04 PM
  2. Replies: 19
    Last Post: 07-13-2015, 10:15 AM
  3. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  4. Access formula
    By Zeebow in forum Programming
    Replies: 3
    Last Post: 10-03-2014, 02:07 PM
  5. Access formula
    By Sujathajosh in forum Programming
    Replies: 2
    Last Post: 08-21-2014, 11:32 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