I am using AC 2010 where i am having a query named Payrol through this query i am updating (Append) a table named Payroll everything is going fine but query geting slow on appending data and this slow increasing gradually after data of months increasing i have used multiples of formulas in this query may be this is the reason of slowing ... here is list of formulas below is there any posibility to do all theses through VBA
IIf([in] Is Null And [wd]<>"Sunday" And [offday]<>[wd] And [nature]<>"Public holiday","Absent","Present")
Dt: Val(Nz(Format([dates],"mmddyyyy")))
Nature: IIf(DLookUp("comments","hl","dts = " & [dt]),"Public Holiday","Routine")
LateM: Val(Nz(IIf([shift slot]="hourly",DateDiff("n",[start],[in])/60*60,"0")))
EarlyM: Val(Nz(IIf([nature]="Routine",IIf([shift slot]="Hourly",DateDiff("n",[out],[end])/60*60,"0"),"0")))
Absent: Val(Nz(IIf([status]="absent","1","0")))
Present: Val(Nz(IIf([status]="present","1","0")))
dayWage: Nz([cp],0)/Nz([md],0)
hWage: Val(Nz(Nz([daywage],0)/Nz([dhour],0)))
MWage: Val(Nz(Nz([hwage],0)/60))
Absentwage: Nz([daywage],0)*Nz([absent],0)
Presentwage: Nz([daywage],0)*Nz([present],0)
LWage: Val(Nz(Nz([latem],0)*Nz([mwage],0)))
EWage: Nz([earlym],0)*Nz([mwage],0)
ded: Nz([lwage],0)+Nz([ewage],0)
Net: (Nz([arrears],0)+Nz([presentwage],0))-Nz([ded],0)
CP: Val(Nz(DLookUp("currnetpay","app3","empl = " & [empid])))
IIf([in] Is Null And [wd]<>"Sunday" And [offday]<>[wd] And [nature]<>"Public holiday","Absent","Present")
Dt: Val(Nz(Format([dates],"mmddyyyy")))
Nature: IIf(DLookUp("comments","hl","dts = " & [dt]),"Public Holiday","Routine")
LateM: Val(Nz(IIf([shift slot]="hourly",DateDiff("n",[start],[in])/60*60,"0")))
EarlyM: Val(Nz(IIf([nature]="Routine",IIf([shift slot]="Hourly",DateDiff("n",[out],[end])/60*60,"0"),"0")))
Absent: Val(Nz(IIf([status]="absent","1","0")))
Present: Val(Nz(IIf([status]="present","1","0")))
dayWage: Nz([cp],0)/Nz([md],0)
hWage: Val(Nz(Nz([daywage],0)/Nz([dhour],0)))
MWage: Val(Nz(Nz([hwage],0)/60))
Absentwage: Nz([daywage],0)*Nz([absent],0)
Presentwage: Nz([daywage],0)*Nz([present],0)
LWage: Val(Nz(Nz([latem],0)*Nz([mwage],0)))
EWage: Nz([earlym],0)*Nz([mwage],0)
ded: Nz([lwage],0)+Nz([ewage],0)
Net: (Nz([arrears],0)+Nz([presentwage],0))-Nz([ded],0)
CP: Val(Nz(DLookUp("currnetpay","app3","empl = " & [empid])))
Last edited: