Checkboxes, subforms, & sum

miscnine

New member
Local time
Yesterday, 18:06
Joined
Jun 14, 2002
Messages
9
I am designing a form for screenprinting, and need some help with a subform problem. On my form (frmorder) I have the subform (sfrmgraphic) with the fields name, style, colors, notes, amount (all text boxes) and film (a checkbox). I have the subform in the Continuous Foms view, so that I can see up to four items at one time. I want to be able to calculate the sum of the field amount, but only if the checkbox is selected for that item.

Example:
There are 4 items in the subform, each with a value of "$1.00" in the amount field. Only item 1 and 2 have the film checkbox selected. The total I would like to see is $2.00, not $4.00. Then if I select the checkbox on item #3, the total should change to $3.00.

Is this possible? Thank you in advance for your help.
 
On the subform AfterUpdate event, run a DAO query which sums the appropriate subforms field, then store that value in an unbound field (or bound field if you need to save it).
 
llkhoutx said:
On the subform AfterUpdate event, run a DAO query which sums the appropriate subforms field, then store that value in an unbound field (or bound field if you need to save it).

I don't know what a DAO query is, can you explain more? Thanks.
 

Users who are viewing this thread

Back
Top Bottom