sql server - access report field pulling from not null column error without NZ() function -


i working on converting access database sql server backend. i've got of working, 1 thing haven't been able figure out yet on 1 of reports run, few fields show #error! field's control source is:

=dsum("[customerminutes]","qryoutagesummarybydaterange","nz([cityrelated])= 0") 

it works fine shown, takes lot longer load report , cityrelated field not null field, feel though shouldn't need use nz() function. have opened query in datasheet view , there appropriately isn't nulls. more happy provide more detail, don't know other information should provide. or general direction appreciated!

the database function (dsum, etc.) fussy use of brackets. try this.

=dsum("iif([customerminutes] null,0,[customerminutes])","[qryoutagesummarybydaterange]","[cityrelated] null or [cityrelated]=0") 

if customerminutes never null can use customerminutes first argument.

notice square brackets around table or query name, not required single field-name. (this opposite how examples appear in system.)

i prefer avoid nz - can, in experience, cause problems aggregate functions, or when used in sequence of queries.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -