Results 1 to 4 of 4

Thread: Form/Table (97)

  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form/Table (97)

    Hi,
    I have a form that displays the following items "MPD REF" "ACCESS HRS" and "PANEL Nos". The MPD REF and "ACCESS HRS" come from a table called "Master". On the form you can input the "panel no" associated with that MPD REF. For example with MPD REF 5 you might have panels 234R 345F and 561H. In another table called "Master panel with hours" a list of all the panels is contained with their "access hrs". What id like to happen is the "access hrs" associated with that "MPD REF" are added up and brought into the table "MASTER" where an empty field of "ACCESS HRS" exists.

    Many thanks for the help in advance,
    Rob.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form/Table (97)

    Standard reply: why do you want/need to store derived information in a table? Unless there is a special reason, it is better to use a query to sum the number of hours for each MPD REF. That way, the sum will always be up-to-date. If you store the sum in a table, you run the risk that the stored value doesn't correspond to the actual situation.

  3. #3
    Star Lounger
    Join Date
    Oct 2003
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form/Table (97)

    Yes that is a better way how could that be done with the query would you know?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form/Table (97)

    Create a query based on the "Master" and "Master panel with hours" tables.
    Join the tables on the Panel number field (I guess.)
    Add the "MPD REF" and "Access Hrs" fields to the query grid.
    Make the query into a Totals query (Query menu or Totals button on the toolbar.)
    Leave the Total option for "MPD REF" as Group By, and set it for "Access Hrs" to Sum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •