Looking for solution with update query

E

Eric Wade

Here's the scenario:

Have a table with many loans (mortgage), I have a query
that based upon certain criteria will have a field in the
table that gets marked "Yes/No" depending. The problem
however is that there are multiple loan #'s (meaning same
loan #'s in there, that have different criteria). If one
of the loans gets marked yes, all of the other loans with
the same loan #, need to be marked as yes as well. I
can't figure a good solution to do this using update
queries. If I'm looking in the wrong area, please point
me in the write direction. If you need more information
let me know and I will provide. Thank you in advance.
 
V

Van T. Dinh

There may a number of different ways of doing this but generally, you will
need a Query with a SubQuery using the IN operator or the EXISTS clause.

Something like:

UPDATE YourTable
SET SomeField = True
WHERE LoanNo IN
(
SELECT LoanNo
FROM YourTable As T2
WHERE T2.SomeOtherField = {some criteria}
)

Check the keywords IN (operator) and EXISTS in the JET SQL Reference in
Access Help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top