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.
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.