Re: Brain Cramp!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: SteveS (sanfu)
Date: 09/08/04

  • Next message: Les Coover: "Select Distinct Records"
    Date: Wed, 8 Sep 2004 13:15:22 -0700
    
    

    It looks like you are attempting to sum across fields/columns in a single
    record. This generally suggests your table structure(s) are not normalized.
    Why is this bad?Because you will have to edit the queries, forms and reports
    every time you have to add another Item.

    But to answer your question, all of the Item weight fields should be in the
    query grid.

    You can't use the function Sum() because it adds rows not columns. So in a
    column of the query, enter:

    Total_Wt: Item_1 + Item_2 + Item_3 + ... + Item_n

    You might be able to add a text box control and set the control source as
    (instead of the column in the query):

    =Item_1 + Item_2 + Item_3 + ... + Item_n

    HTH
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

    "anonymous@discussions.microsoft.com" wrote:

    > customer | Item_1 | Item_2 |Item_n | Total_1-n |
    >
    > Item_1, etc are the weights for the items
    >
    >
    > >-----Original Message-----
    > >I don't see anything that suggests you are storing
    > shipping weights.
    > >Considering what you have provided, your request is
    > impossible.
    > >
    > >--
    > >Duane Hookom
    > >MS Access MVP
    > >--
    > >
    > >"JR" <anonymous@discussions.microsoft.com> wrote in
    > message
    > >news:821901c495b0$66bb7340$a501280a@phx.gbl...
    > >> In a query I have to sum shipping weights for different
    > >> items.
    > >>
    > >> customer | Item_1 | Item_2 |Item_n | Total_1-n |
    > >>
    > >> How can I get this done?
    > >>
    > >> Thanks!
    > >
    > >
    > >.
    > >
    >


  • Next message: Les Coover: "Select Distinct Records"

    Relevant Pages

    • Re: Summing IIF Statements in form footer
      ... do i go about getting sum of the fields based off a function. ... control source: =Sum) ... >> out going into the query to have change it everytime it needs to be ... the main problem is on the form footer i need it to show me ...
      (microsoft.public.access.forms)
    • Re: Printing a form
      ... If the query contain only one record that hold the sum of the field, ... use DLookUp in the control source of the text field ... the DSum function in the control source of the text field ...
      (microsoft.public.access.forms)
    • RE: updating control
      ... Maybe you can clarify what you're doing because that control source ... does not "sum the amounts from ten different text boxes". ... It could be that "Collections" is a query and ...
      (microsoft.public.access.formscoding)
    • Re: Total up a field
      ... Sum() can be used in Report sections to sum ... If you want the sum to appear in the report footer, ... I am using Access 97 and I have a report based on a query "qryInformation". ... control source property. ...
      (microsoft.public.access.reports)
    • RE: Calculated fields in main form based on criteria in sub form
      ... Main form (goat survey table and Total queries) ... NE Sum Query (uses information from the subform, ... other queries differ in what Quadrant equals) ...
      (microsoft.public.access.forms)