remove expire leave

jocelyn_ooi

Registered User.
Local time
Today, 09:56
Joined
Sep 27, 2011
Messages
17
hi there...i want to write a code by automatic write off the brought forward leave when the brought forward date is already expired... anyone gt any idea can teach me?

Me.txt_leave_entitled = Nz(DLookup("lea_bf", "tblLeave", strEmpLink))
Me.txt_bf_leave = Nz(DLookup("lea_bf_exp_date", "tblLeave", strEmpLink))

If (Me.txt_bf_leave) > (Me.TxtDate) Then
Me.txt_leave_entitled = "0"
End If


i dunno how to set the formula...pls help!!!
 
You seem to be setting the leave as a string when it should be a number. There should not be any quote marks around the zero.

BTW. I am not clear on how you are calculating leave but note there should not be a balance recorded anywhere. The balance should be calculated from the total entitlement to date less the total taken to date.
 

Users who are viewing this thread

Back
Top Bottom