aggregate functions - Get rid of #Error in Access 2007 group footer report -


i creating report in access 2007 , want average, maximum, , minimum of several lab results. when enter following in control source box, #error message in group footer when records being subtotaled null when displaying report. how can rid of #error , have results return no value @ all.

=cdbl(avg([arsenic])) 

thus data might in report

serum _______________________   arsenic       iron      30          10      30                 15 ____________________ avg  25          10 max  30          10 min  15          10 __________________________ liver __________________________    arsenic      iron                   8                   0                           2 ____________________    avg #error        5 max #error        8 min #error        0 

many thanks

if use =avg([arsenic]), it'll blank. whats causing #error when avg() returns blank, cdbl has null input. if absolutely must have cdbl() whatever reason,

=iif(avg([arsenic]) null,"",cdbl(avg([arsenic]))) 

will work


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -