Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Access Formulas

Discussion in 'Information Technology' started by Sara, Jul 28, 2006.

  1. Sara

    Sara
    Expand Collapse
    Guest

    I have a table that has cable names and lengths in it. I have a form that I
    have created that just has the cable names. Also in the form I have a field
    for length and I want Access to add of the lenght of all of my cable
    segments to tell me how long the whole thing will be. Is there a formula to
    do this?
     
  2. Loading...


  3. Joan Wild

    Joan Wild
    Expand Collapse
    Guest

    Base your form on a query (you won't be able to edit though). In the query,
    add your table and the two fields. Click on View, Totals. Under Cable Name
    choose Group By and under Length choose Sum.

    --
    Joan Wild
    Microsoft Access MVP

    Sara wrote:
    > I have a table that has cable names and lengths in it. I have a form
    > that I have created that just has the cable names. Also in the form
    > I have a field for length and I want Access to add of the lenght of
    > all of my cable segments to tell me how long the whole thing will be.
    > Is there a formula to do this?
     
  4. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    Hi Sara

    Create an unbound text box in the form footer (if you can't see this - click
    the View Menu and select headers and footers).

    In the text box add the coutrol source as a Sum of the legnths.
    =Sum([length1]+[length2]+[length3]+[length4])

    Hope this helps
    --
    Wayne
    Manchester, England.



    "Sara" wrote:

    > I have a table that has cable names and lengths in it. I have a form that I
    > have created that just has the cable names. Also in the form I have a field
    > for length and I want Access to add of the lenght of all of my cable
    > segments to tell me how long the whole thing will be. Is there a formula to
    > do this?
     
  5. Sheila D

    Sheila D
    Expand Collapse
    Guest

    Sara - if your lengths are in different fields in the same record then you
    need Field1+FIeld2 etc. If they are in different records then a Totals query
    might do the trick. Create a query and in design view click the totals button
    (like the Autosum button in Excel) Group on the Cable Name and Sum the
    Lengths.
    HTH - Sheila

    "Sara" wrote:

    > I have a table that has cable names and lengths in it. I have a form that I
    > have created that just has the cable names. Also in the form I have a field
    > for length and I want Access to add of the lenght of all of my cable
    > segments to tell me how long the whole thing will be. Is there a formula to
    > do this?
     
  6. Sara

    Sara
    Expand Collapse
    Guest

    Thanks, I am going to try all of your suggestions, I have been working on
    this all morning, I hope this works. Keep posting suggestions though I
    really do appreciate it!

    "Sara" wrote:

    > I have a table that has cable names and lengths in it. I have a form that I
    > have created that just has the cable names. Also in the form I have a field
    > for length and I want Access to add of the lenght of all of my cable
    > segments to tell me how long the whole thing will be. Is there a formula to
    > do this?
     
  7. Sara, Houston, Texas

    Sara, Houston, Texas
    Expand Collapse
    Guest

    OKAY, I made a query and the fields are Segment Name and Segment Length.
    Somehow I need to get the Segment Lengths to add up when I enter the segment
    name in my form that I have created. I am not too good at access but I will
    get through this with the help of you wonderful helpful people.

    "Sheila D" wrote:

    > Sara - if your lengths are in different fields in the same record then you
    > need Field1+FIeld2 etc. If they are in different records then a Totals query
    > might do the trick. Create a query and in design view click the totals button
    > (like the Autosum button in Excel) Group on the Cable Name and Sum the
    > Lengths.
    > HTH - Sheila
    >
    > "Sara" wrote:
    >
    > > I have a table that has cable names and lengths in it. I have a form that I
    > > have created that just has the cable names. Also in the form I have a field
    > > for length and I want Access to add of the lenght of all of my cable
    > > segments to tell me how long the whole thing will be. Is there a formula to
    > > do this?
     
  8. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Tue, 20 Jun 2006 09:09:02 -0700, Sara, Houston, Texas
    <SaraHoustonTexas@discussions.microsoft.com> wrote:

    >OKAY, I made a query and the fields are Segment Name and Segment Length.
    >Somehow I need to get the Segment Lengths to add up when I enter the segment
    >name in my form that I have created. I am not too good at access but I will
    >get through this with the help of you wonderful helpful people.


    To see a sum that updates dynamically, consider using a continuous
    Subform. Make the Form Footer visible (with the View menu option), and
    put a textbox on the footer with a control source

    =Sum([Segment Length])

    This will display the sum of that field for all records on the
    subform.

    Note that you should probably NOT store this sum anywhere - just
    calculate it as needed.

    John W. Vinson[MVP]
     

Share This Page