Multiplying a column when record does not appear on a separate table

I would like to multiple a column by a % unless a corresponding record is located in a separate table.  For example, in the attached database, the query multiplies the entire Item Table by 90%.  I would like for the query to not apply the 90% to Item# 2 since it appears on the Nondiscount Table.  The expected output should appear as below, where all values are multipled by 90% (Expr1) except record 2.

Item#      Value1             Expr1
1             $60.00              $54
2            $300.00              $300
3            $700.00              $630
4            $900.00           $810
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You basically use a Left Join on the NonDiscount table, and then filter for any records which have a NULL value in NonDiscount.Value. The SQL would look like this:

SELECT [Item Table].[Item#], [Item Table].Value1, [Item Table].[Value1]*0.9 AS Expr1, [NonDiscount Table].Value1
FROM [Item Table] LEFT JOIN [NonDiscount Table] ON [Item Table].Value1 = [NonDiscount Table].Value1
WHERE ((([NonDiscount Table].Value1) Is Null));

To test this, open your query, then switch to SQL View. Copy/paste the SQL above into that, then switch back over to Design/Datasheet view.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gustav BrockCIOCommented:
You can use this Query:

    [Item Table].[Item#],
    [Item Table].Value1,
    CCur(Nz([NonDiscount Table]![Value1],[Item Table]![Value1]*0.9)) AS NewValue
    [Item Table]
    [NonDiscount Table]
    ON [Item Table].[Item#] = [NonDiscount Table].[Item#];

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.