forms - if dsum is blank then insert 0 -


i trying sum text boxes in form within access 2010.

within text boxes summing there dsum function. query time dependent , updated throughout day. causes boxes empty @ points throughout day. need input 0 can sum total in box having trouble.

here have tried far.

= iid(dsum("[field_name]", "[table_name]", "[time]='08'") = '', 0, _        dsum("[field_name]", "[table_name]", "[time]='08'")) 

i have tried single , double quotes around 0 , single , double quotes around 'if blank' may haven't got right permutation? please driving me nuts!

dsum returns null, if condition not met. try wrapping in nz(). like,

= nz(dsum("[field_name]","[table_name]","[time]='08'"), 0) 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -