Someone put in effort to help me (thank you) and I used quality time but no success yet, but not ready to ever give up. I place a new thread for there are changes to my previous thread on this subject.
- My system stores every months salaries successfully, every salary slip makes up one record. If a business has 50 employees, there will be 50 records stored after the first month, 100 after the second, 150 after the third of course.
- For two years no issue to calculate the “Year to Date” numbers for salary slips.
- I want to set up the system not to store records in a couple of sections, if I can learn how to set up salaries to calculate any historical month’s “Year to Date” numbers it will be great. It can be done.
- I use the same expression a couple of places elsewhere and it works, unable this far to find, why not here.
- Table t03SalNWgeReview as on the image stores 17 records, of 11 employees employed. If a salary never changes that record will be actual. When it changes the dates must cover all the time the employee is working. It is common that increases or changes of salary happens all the time.
- In query “q04SalaryProcessing06” I achieved to filter the employees that worked for the months since the beginning of the financial year. If the financial year started 1 March and the salary date is now 31 October it is month 8 of 12. If an employee worked for three months, his name will be listed 3 times on this list.
- My story here maybe long, but the short is I need an expression to return the salary from t03SalNWgeReview in q04SalaryProcessing06 for the month worked. The expression here should do it. I assumed it was the formatting of the dates, I changed the information to come from tables, where there are no formatting on the dates like the other places where this expression works, but something is still wrong.
Salary069e: DLookUp("SalOrWgeRate071","t03SalNWgeReview","Empl oy_ID071 =" & [Employ_ID069e] And " & Format([LstDayOfMnth069e],yyyy/mm/dd) & " Between [StartDate071] And [Enddate071a]). This expression should be placed in q04Salaryprocessing06, it is not there on the image.
![]()