This may not need vba at all. If your tables were structured so that they contained fields to support this, your query could apply the discount where the record contained a discount rate. So a discount Yes/No field is probably not needed either since the absence of a rate means it cannot be discounted. Not saying you shouldn't use vba since it is more powerful much of the time. Just saying long IIF expressions are not only unwieldy, they're not very flexible when things change, and you should have options.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.