Welcome to SPN

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

Sign Up Now!

Totals in Query's

Discussion in 'Information Technology' started by danijela.simunovic@gmail.com, Oct 28, 2005.

  1. danijela.simunovic@gmail.com

    Guest

    Hi!
    Is there a way to make a row in a query, I would like to be the first
    or the last row and that it contains totals of all the data in the
    query(of that column,or all columns,or have some formulas)? And can i
    freeze the first row where would those totals be?
    Thanks,

    Danijela
     
  2. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    danijela.simunovic@gmail.com wrote:
    > Hi!
    > Is there a way to make a row in a query, I would like to be the first
    > or the last row and that it contains totals of all the data in the
    > query(of that column,or all columns,or have some formulas)? And can i
    > freeze the first row where would those totals be?
    > Thanks,
    >
    > Danijela


    From the built in help file:

    About calculations in a query
    There are many types of calculations you can perform in a query. For
    example, you can calculate the sum or average of the values in one field,
    multiply the values in two fields, or calculate the date three months from
    the current date. You perform calculations in a query using:

    Predefined calculations, called "totals," to compute the following amounts
    for groups of records or for all the records combined in the query: sum,
    average, count, minimum, maximum, standard deviation, or variance.
    A custom calculation to perform numeric, date, and text calculations on each
    record using data from one or more fields. You need to create a new
    calculated field directly in the design grid for these types of
    calculations.

    When you display the results of a calculation in a field, the results aren't
    actually stored in the underlying table. Instead, Microsoft Access reruns
    the calculation each time you run the query so that the results are always
    based on the most current data in the database. Therefore, you can't
    manually update the calculated results.


    To display the results of a calculation in a field, you can use a predefined
    calculation that Access provides or custom calculations you define. Use the
    predefined calculations, called aggregate functions or "totals," if you want
    to compute the following amounts for all records or for groups of records:
    sum, average, count, minimum, maximum, standard deviation, or variance. You
    choose one totals calculation for each field you want to calculate.



    Calculations on all records

    Calculations on groups of records

    You can calculate some types of totals using the Simple Query Wizard. Or,
    you can calculate all types of totals using the Total row in the query
    design grid, where you select the aggregate function for the calculation you
    want to perform on a field.

    In the query design grid, you can also specify criteria to affect the
    calculations and produce different query results. By adding criteria, you
    can limit the:

    Groups before performing calculations on those groups.
    Results after calculations on the groups are performed.
    Records before they are grouped and before calculations are performed


    --
    Joseph Meehan

    Dia duit
     
  3. rico

    rico
    Expand Collapse
    Guest

    Use a form to display the information from the query, you can create the
    total fields in the header or the footer of form.

    HTH

    Rico

    "danijela.simunovic@gmail.com" wrote:

    > Hi!
    > Is there a way to make a row in a query, I would like to be the first
    > or the last row and that it contains totals of all the data in the
    > query(of that column,or all columns,or have some formulas)? And can i
    > freeze the first row where would those totals be?
    > Thanks,
    >
    > Danijela
    >
    >
     

Share This Page