var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Really Easy Subform Question...
I feel pretty dumb asking this...
I have a subform that displays our vendor's item package depending on the machine chosen earlier in the Form.
I would like to total the amount displayed in the subform, so I can use it in cost analysis.
Would I use the Control Source of a textbox outside of the subform but on the main form to do this? And what kind of source would I need?
I have a query, listed below, that will pull it up depending on the DetailID (which is generated in the form...) but I don't know how to factor this query in with my form.
SELECT [Marposs Laser Parts].MarpossLaserPartID, [Marposs Laser Parts].MarpossPartNum, [Marposs Laser Parts].MarpossPartDescription, [Marposs Laser Parts].MarpossPartCost, [Marposs Laser Parts].ModelID, MachineDetail.DetailID
FROM [Marposs Laser Parts], MachineDetail
WHERE ((([Marposs Laser Parts].ModelID)=[MachineDetail].[ModelID]) AND ((MachineDetail.DetailID)=[Purchase Info].[DetailID]));
an easy way...
An easy way to do this is to make a footer in the subform and do totals there.
You would create a textbox (must be in the footer) and do something like:
I tried to do that, but it really didn't work in Datasheet view, and in Single Form view the footer textbox appeared, but it did so repeatedly with each item, and I couldn't sum.
I think it's just evil.
Any ideas would be great.
Aah, the sum will only work with a subform in continuous form (sorry for the assumption). I wouldn't make a moral judgement on it just yet, although you're probably right about being evil.
If you're stuck with datasheet/single form, you could create another subform to display the totals. Just create a totals query that groups by MachineID and sums MarpossPartCost.
Let me know if you need further help with that.