PDA

View Full Version : Convert IF statement into Loop Function



BGT
04-02-2021, 09:26 AM
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.

Gasman
04-03-2021, 05:23 AM
Crossposted at https://www.accessforums.net/showthread.php?t=83358 with replies and a solution