Hi there,
Is anyone willing to help me a bit on this:
I have a table tbl_Rates which holds the amount an employee would be payed within a certain time limit. eg.
01.01.2016 till 31.12.2017 - 50 €
01.01.2018 till 31.12.2018 - 55 €
01.01.2019 till (is null) -60 €
Now for reporting purposes I need to:
Work done on 25.10.2016 - Rate 50€
Work done 02.02.2019 - rate 60€
I have this: rate = Nz(DLookup("[RateofPay]", "[tbl_Rates]", "[tblxx_Personal_Id]=" & Stunden!tblxx_Personal_ID & " and " & "[RateStart]<= " & sqlWorkdate & " and " & "[RateEnd]>= " & Workdate), 0)
which work fine but not if the period is in the current period(without an end date... so I need something like this:
rate= Nz(DLookup("[RateofPay]", "[tbl_Rates]", "[tblxx_Personal_Id]=" & Stunden!tblxx_Personal_ID And "[RateStart]<= " & Workdate And "[RateEnd]>= " & sWorkdate Or IsNull([RateEnd])), 0)
Whew! I hope this makes sense to someone....
Basically I have the date on which the work was done and must find the applicable rate....
Is anyone willing to help me a bit on this:
I have a table tbl_Rates which holds the amount an employee would be payed within a certain time limit. eg.
01.01.2016 till 31.12.2017 - 50 €
01.01.2018 till 31.12.2018 - 55 €
01.01.2019 till (is null) -60 €
Now for reporting purposes I need to:
Work done on 25.10.2016 - Rate 50€
Work done 02.02.2019 - rate 60€
I have this: rate = Nz(DLookup("[RateofPay]", "[tbl_Rates]", "[tblxx_Personal_Id]=" & Stunden!tblxx_Personal_ID & " and " & "[RateStart]<= " & sqlWorkdate & " and " & "[RateEnd]>= " & Workdate), 0)
which work fine but not if the period is in the current period(without an end date... so I need something like this:
rate= Nz(DLookup("[RateofPay]", "[tbl_Rates]", "[tblxx_Personal_Id]=" & Stunden!tblxx_Personal_ID And "[RateStart]<= " & Workdate And "[RateEnd]>= " & sWorkdate Or IsNull([RateEnd])), 0)
Whew! I hope this makes sense to someone....
Basically I have the date on which the work was done and must find the applicable rate....