RE: running sum from a subform
From: Millisa Eubanks (MillisaEubanks_at_discussions.microsoft.com)
Date: 01/14/05
- Next message: '69 Camaro: "Re: Form goes into code for no apparent reason"
- Previous message: SteveS: "Re: Modules not working or Its impossible to do the task"
- In reply to: Sprinks: "RE: running sum from a subform"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 20:15:04 -0800
Thanks you for your help Sprinks. I only have 1 more real issue (or at least
I think its the last).
I was able to build a query that did the calcuations. But while I am later
applying a filter to theses fields by actively building a WHERE statement for
the OpenForm property, I run into the problem of to use HAVING instead of
WHERE. This means I can't use the calcualted query. So I'm going to have to
store the values after all. I trid what you said by putting Me![TOTAL$] =
Sum([QUANITY] *[UPRICE]) in the bound control property box but I just got a
Name# error. I can't think of where else to put this info. Any ideas.
"Sprinks" wrote:
> Millisa,
>
> Begin a new query, selecting the table or tables that contain the fields of
> your expression. In the query design grid, in the Field row, enter a
> calculated field, following the syntax:
>
> CalcalatedFieldName: expression
>
> For example, to calculate the extended price of a line item,
>
> Extd: [Qty]*[UnitPrice]
>
> Press the Exclamation Point to see the result, which will be a list of
> [Qty]*[UnitPrice] for each line item in your table.
>
> To sum this calculated field for ALL records in your database, switch to
> Totals View (View, Totals). Change the default "Group By" in the Totals row
> to Sum. Now click the Exclamation Point to see the result.
>
> If you wish to calculate a total, grouping on some other field (such as
> Order), drag that table's primary key (OrderNumber in this case) to the grid,
> and keep the default "Group By" in the Total: row. This will now calculate a
> separate total for each unique OrderNumber.
>
> If, in addition, you have selection criteria, such as selecting records from
> this year, drag the field to the grid, select WHERE in the Total: row, and
> enter your criteria.
>
> Hope that solves it.
> Sprinks
>
> "Millisa Eubanks" wrote:
>
> > Nevermind the last post. I got it working agian but I'm not sure what went
> > wrong or how I fixed it. Oh well. What I'm trying to do now is to figure
> > out how to get a query to pull the values. I've tried my referance books but
> > no dice. Could I please get some pointers
- Next message: '69 Camaro: "Re: Form goes into code for no apparent reason"
- Previous message: SteveS: "Re: Modules not working or Its impossible to do the task"
- In reply to: Sprinks: "RE: running sum from a subform"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|