Hello,
I am trying to create a macro in US payroll that searches for a specific earnings code, grabs the G/L Dist Code and applies that distribution code to other earnings codes for that employee.
Is it possible to have a .browse statement within a .browse statement for the same table? Here is what I was thinking but I don't know if this is possible"
If this is not possible, could someone suggest how I can accomplish this?
Thank you.
If at first you don't succeed, then sky diving wasn't meant for you!
I am trying to create a macro in US payroll that searches for a specific earnings code, grabs the G/L Dist Code and applies that distribution code to other earnings codes for that employee.
Is it possible to have a .browse statement within a .browse statement for the same table? Here is what I was thinking but I don't know if this is possible"
Code:
UPEMPD.Browse "EARNDED = 'REG'" & "", 1
Do While UPEMPD.Fetch
l_strEmp = UPEMPD.Fields("EMPLOYEE")
l_strDistCode = UPEMPD.Fields("DISTCODE")
UPEMPD.Browse "EMPLOYEE= " & l_strEmp" & "", 1
Do While UPEMPD.Fetch
Select Case UPEMPD.Fields("EARNDED")
Case OT1, OT2
UPEMPD.Fields("DISTCODE") = l_strDistCode
UPEMPD.update
END Select
Loop
Loop
If this is not possible, could someone suggest how I can accomplish this?
Thank you.
If at first you don't succeed, then sky diving wasn't meant for you!