lluviosa
11-27-2001, 07:15 AM
Hi,
I have a form that shows specific data from a large table. I created a subform to total data on the form, and now want to total specific data on the form (which is already showing specific data from the table). The DSUM funcion hasn't worked either in the form or the subform and I'm at wits' end. Any suggestions would be highly appreciated.
Thanks.
Add an unbound text box to the subform footer, set its control source to =SUM([Field])add another unbound text box to the main form control source =Forms!SubformName!TextBoxName
lluviosa
11-27-2001, 10:59 AM
Did that already for Field totals without criteria, but do you know how to total Fields with criteria?
Tried the DSum function but I don't think that's for forms. (i.e.: DSum(expr, domain[, criteria])
Thanks
John.Woody
11-27-2001, 12:01 PM
Try Creating a query to sum the specific data and then call the required field to an unbound text box on the form.
HTH
Woody
lluviosa
11-27-2001, 12:21 PM
Not sure if I understand...
The problem is, I'm trying to total a subset within a subset:
Source table: total company sales
Subset 1 (on the form): total sales for a certain product (driven by a filter from another form, so which product it is changes)
Subset 2: total sales for the certain product by a certain sales rep [this is where I'm having problems]
Is there a way to write a totalling expression that contains multiple criteria, one of which is linked to the main form's filter and therefore changes?
lluviosa
11-27-2001, 01:01 PM
The query idea worked!!!
I built a query for the sales rep (second subset), linked a subform to the query, and linked the subform to the main form using the first subset criteria (product).
THANKS.