R
Ruth
iif (complicated expression<0,0,original complicated expression) - when
writing iif statements of this format as a field in an access query, can I
avoid defining the complicated expression twice. i.e I want to somehow call
the complicated expression by a temp field name e.g. x. I know I could do
this by putting the complicated expression in a second field, but somehow I
feel it would be neater if all in the same field.
e.g. in the below how can I only need to define the complicated expression
,[Net Capacity]-[max workplace]*([permanent Capacity]/([Permanent
Capacity]+[Temporary Capacity])) once?
secTempinNC: IIf([sort]="PR",0,IIf([Net Capacity]-[max
workplace]*([permanent Capacity]/([Permanent Capacity]+[Temporary
Capacity]))<0,0,[Net Capacity]-[max workplace]*([permanent
Capacity]/([Permanent Capacity]+[Temporary Capacity]))))
writing iif statements of this format as a field in an access query, can I
avoid defining the complicated expression twice. i.e I want to somehow call
the complicated expression by a temp field name e.g. x. I know I could do
this by putting the complicated expression in a second field, but somehow I
feel it would be neater if all in the same field.
e.g. in the below how can I only need to define the complicated expression
,[Net Capacity]-[max workplace]*([permanent Capacity]/([Permanent
Capacity]+[Temporary Capacity])) once?
secTempinNC: IIf([sort]="PR",0,IIf([Net Capacity]-[max
workplace]*([permanent Capacity]/([Permanent Capacity]+[Temporary
Capacity]))<0,0,[Net Capacity]-[max workplace]*([permanent
Capacity]/([Permanent Capacity]+[Temporary Capacity]))))