Variable Formula Dependent on Field Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am setting up a dbase to calculate the amount of air emissions when using
paint in an autobody shop. The equation (formula) varies depending on whether
or not the paint has less than 33% total solvents or greater than 33% total
solvents. Paint contains many different solvents. Any idea on the best
approach?

I am thinking that perhaps I total solvent A + solvent B, etc and then use
an IF statement such as IF TOTAL solvent >33% use equation A or IF total
solvent <33% use equation B. I know to do the total solvent equation in the
query. Can I put the IF statement in the query as well and if so, what would
be the syntax for doing this. Here is abstract code of what I am trying to
accomplish:

IF (Solvent A + Solvent B) > 33% then (Run Emission Formula A) OR IF
(Solvent A + Solvent B) < 33% then (Run Emission Formula B) Thanks.
 
Sounds like something you could do in a query, using the IIF() function.
Check it out in Access HELP.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor
 
Thanks Jeff. I'll have to wait though since for some reason my Help files
won't work when I press F1.
 
Try opening a code module and clicking Help.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor
 
Back
Top