How to Conditional Sum on a Form.
In this example I have a Continuous Form with Bound and Unbound Controls (fields in Queries and Tables).
On the Form Footer and Header I have Unbound Controls that Sum the Controls in the Form Detail.
Example: Unbound Control in Form Footer or Header has this in the Control Source box of the Properties Data Tab.
=Sum([BoundControlName]) Substitute BoundControlName for your Control Name.
Where you have more then one of these Unbound Controls that Sum your Data, You can do calculations with these.
=[UnboundControlNameA]-[UnboundControlNameB] again, put in Control Source of your new Control (text box)
Note.. The UnboundControlNameA & B are the Name from your previous unbound controls. You get the Name from the Other Tab on your Control Property.
In example 1 we use the Data Source of the Bound Control but in example 2 we use the Name of the Control. When you create your Unbound Control (text box) the system gives it a name - Change the name to something meaningful But don't repeat a name already used by either a bound or unbound control.
Conditional Sum..
Example Bound Controls in your Form Details are:
SalePrice (Currency), Delivered (Text yes or No)
To Sum the Sale Price where Delivered is "Yes"
=Sum(IIf([Delivered]="Yes", [SalePrice],0))
again, in the Control Source of your Unbound Control's Data Property.
And should you wish to add or subtract these Controls, just refer to Their respective Control names.
Trust this assists