Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    7

    Unanswered: Calculate a tabular form

    I'm creating a database of pollutants which we must submit to the state, but I'm having some problems getting it to work correctly.

    I have a table "tblHAPS". This table is a list of all Hazardous Air Pollutants on the EPA's list. I also have a table "tblPlChemicals" and it's form which is a list of chemicals we use. The chemicals HAPS are stored in this table and selected by combo box from "tblHAPS".

    I then have an input form and table "tblPlInput" used to store monthly usage information. I input the date and select the chemical from a combo box which references "tblPlChemicals". This pulls the chemicals HAPS and their percentages in that chemical. The subform that lists the HAPS is a tabular form. I need to automatically calculate the emissions in the subform by the HAP percentage on the subform and the usage figure on the main form.

    I seem to have it working except it uses the percentage of the first HAP in the chemical to calculate the emissions of the other HAPS in that chemical as well.

    I've attached the database to maybe better explain.

    Thanks,
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2004
    Posts
    10
    Not sure if I did the math right but I have gotten this to work. In the subform frmsubPlHAPS in the Emissions field enter =[Per]/[Forms]![frmPlInput]![Usage] in the Control Source. This is dividing the Per from the sub-form by the Usage on the main form. When I go thru each record the subform is changing like it should. Even the last record which has two different percentages has two different emissions.

    Let me know if this works for you.

  3. #3
    Join Date
    Apr 2004
    Posts
    7
    Thanks for the quick response.

    I'll give it a try.

    Thanks again.

Posting Permissions

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