Hi,
I've read that IIf function is somewhat slow since it has to compute both the true and false part of the equation everytime. Would it be better to build a custom VBA function something like this (example of string fields):
Function CustomIf(criteria as string, truepart as string, falsepart as string)as string
If Criteria Then
CustomIf=truepart
else
CustomIf=falsepart
End If
End Function
Would this be computed faster as using IIf(criteria,truepart,falsepart) as an expression???
Thanks
I've read that IIf function is somewhat slow since it has to compute both the true and false part of the equation everytime. Would it be better to build a custom VBA function something like this (example of string fields):
Function CustomIf(criteria as string, truepart as string, falsepart as string)as string
If Criteria Then
CustomIf=truepart
else
CustomIf=falsepart
End If
End Function
Would this be computed faster as using IIf(criteria,truepart,falsepart) as an expression???
Thanks