Lets say I have two queries like
select iif(condition, col, null) from table
select f(col) from table
where col
is a double-valued column f
is a VBA-public function(value as double) as variant
. Somewhere later, I alter the format of the respective field to be displayed with a certain number format, for instance as a percentage. I have decided that f
should be a variant
since it is supposed to return Null if appropriate. However, in the former case, the format I specify is respected, but if I switch to the latter, the number format is totally ignored. Why?