S
SC in Texas
I am having problems writing the correct code to replace the dlookup in the
following with use of a recordset in the vb to speedup the report.
For cur_ppedate = StPPED To EPPED Step 14
Sickused = Sickused + Nz(DLookup("SickHrsUsed",
"AllStaffVacleavebyPPEQry", "Staff_ID ='" & StaffID & "'And PPED = #" &
cur_ppedate & "#"))
cur_bal = BegBal + countadds * SickEarnRate - Sickused
If cur_bal < max_bal Then
countadds = countadds + 1
End If
Next
Any help would be appreciated. I now my attempts are probly being thrawted
by simple syntax errors but I can't see what they are.
Thanks,
Steve
following with use of a recordset in the vb to speedup the report.
For cur_ppedate = StPPED To EPPED Step 14
Sickused = Sickused + Nz(DLookup("SickHrsUsed",
"AllStaffVacleavebyPPEQry", "Staff_ID ='" & StaffID & "'And PPED = #" &
cur_ppedate & "#"))
cur_bal = BegBal + countadds * SickEarnRate - Sickused
If cur_bal < max_bal Then
countadds = countadds + 1
End If
Next
Any help would be appreciated. I now my attempts are probly being thrawted
by simple syntax errors but I can't see what they are.
Thanks,
Steve