Consulting

Results 1 to 2 of 2

Thread: Convert IF statement into Loop Function

  1. #1
    VBAX Newbie
    Joined
    Apr 2021
    Posts
    1
    Location

    Convert IF statement into Loop Function

    Please can any one help me to change the follwing if statement into loop function or any Function that can summarize my Satement.

    Field of EmpTable :

    If EmpRank = "A1" then
    EmpSalary = 1000 and EmpMealAllawance = 800 and EmpLeaveAllawance = 500
    elseif EmpRank = "A2" then
    EmpSalary = 1050 and EmpMealAllawance = 820 and EmpLeaveAllawance = 580
    upto EmpRank "A15".
    The EmpSalary, EmpMealAllawance and EmpLeaveAllawance have a differnces of Constant Value = 50, 20 and 80 respectively.
    I just summarized the code.
    And i am using MS Access 2016.

  2. #2
    VBAX Regular
    Joined
    Nov 2020
    Location
    Swansea,South Wales,UK
    Posts
    86
    Location
    Crossposted at https://www.accessforums.net/showthread.php?t=83358 with replies and a solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •