RE: running sum from a subform

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Millisa Eubanks (MillisaEubanks_at_discussions.microsoft.com)
Date: 01/14/05


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



Relevant Pages

  • Re: Delphi7/ADO/SQL Server 2000 TDBGrid problem
    ... I use this approach to edit what I call simple system tables. ... is that I do not edit data in the grid. ... These can only be got rid of by selecting the ... I cannot just close the query and reopen it as I wish to retain the ...
    (borland.public.delphi.database.ado)
  • Delphi7/ADO/SQL Server 2000 TDBGrid problem
    ... Depending on where grid is accessed from a different query is connected to ... indicator column as well. ... These can only be got rid of by selecting the row ...
    (borland.public.delphi.database.ado)
  • RE: running sum from a subform
    ... Begin a new query, selecting the table or tables that contain the fields of ... Totals View. ... Order), drag that table's primary key to the grid, ... If, in addition, you have selection criteria, such as selecting records from ...
    (microsoft.public.access.forms)
  • Re: update query: still having problems
    ... bring the workstatus field in the grid and, at the criteria line, write: ... UPDATE Department INNER JOIN Sheet1 ON Department.employeeID = ... What I want to do is press a button that will run the query and update the ...
    (microsoft.public.access.queries)
  • RE: Change address fields in Table using Unbound Combo Box
    ... I am selecting a new address for the current voter. ... "FindDupsVIT" Query. ... Update the controls in the form based on the values in the columns of the ... Don't confuse the combo's Bound Column property with it's Control ...
    (microsoft.public.access.forms)