I seriously doubt that you have no problem running the query, even with the FROM clause you added:
1. The syntax used for the declaration of the parameters is incorrect in Access (Acc97, Acc2000, Acc2003, Acc2010, Acc2013 and Acc2016-Preview), see ScreenShot001:
PARAMETERS FLOW as Long, PRESSURE as Long;
The correct syntax is:
PARAMETERS FLOW Long, PRESSURE Long;
2. Where does COST!COST come from? There is no reference to a COST table in the FROM clause of the query, it is then treated as a parameter, see ScreenShot002:
3. Although it's not formally incorrect and does not cause any error, it does not make sense to link two tables with an INNER JOIN clause, then repeat the link in a WHERE clause. It's either one or the other, see ScreenShot003:
Except for some general considerations that would not be very useful, it's hard to help you if we don't know the exact SQL expression you're using in your query. Please open the query in SQL view and use the Copy/Paste functionalities of Windows to post the query as it is.