I have a form containing a subform.
The subform contains checkboxes and corresponding amounts and bank account numbers.
In the footer section of the subform is a DSUM formula saying add up all amounts of a particular account whose checkbox is true :=DSum("[Amount]","tblImport","[Import]=True AND [AccountNo] =[Forms]![fmImport]![txtAccountNo]").
The main form has a text box that reports the total of the sub form. Problem I have is when nothing has been checked on the subform the reported total of the subform is #Error.
The formula on the main form is =[sbfImportSelect].[Form]![txtSubTot]
Is an Iif formula the solution?. Or Nz? Or is there another way?
Thanks
The subform contains checkboxes and corresponding amounts and bank account numbers.
In the footer section of the subform is a DSUM formula saying add up all amounts of a particular account whose checkbox is true :=DSum("[Amount]","tblImport","[Import]=True AND [AccountNo] =[Forms]![fmImport]![txtAccountNo]").
The main form has a text box that reports the total of the sub form. Problem I have is when nothing has been checked on the subform the reported total of the subform is #Error.
The formula on the main form is =[sbfImportSelect].[Form]![txtSubTot]
Is an Iif formula the solution?. Or Nz? Or is there another way?
Thanks