I'm having a hard time with this. The main form holds multiple subforms, each of which have a sub total, which is then totaled in a textbox on the mainform. The forms are linked using ms access parent child link functionality. My question is, how do you handle the case where one or more subform queries return zero records?
I've tried the NZ() function at multiple levels (from subform query textbox, to the main form summation textbox.).
I've tried to use VBA to DCOUNT the records in the Query, but that leads to another problem:
- The formula is in the textbox control source, so using vba to set textbox to zero throws an error of it's own.
I've tried to capture the error code, but still run into the prior issue.
What is the standard practice way of achieving a simple summation across forms and handling zero records on a subform query? I feel like this would be a common occurrence.
There are screenshots below showing a form example: