Change records in query

Gavx

Registered User.
Local time
Today, 18:18
Joined
Mar 8, 2014
Messages
155
I am running a query that compares table A with table B and returns records in A that are not in B.
There is a checkbox field in table A which I want to be able to check if it is returned in the unmatched records query.

Unfortunately I cannot update the checkbox field in the query because, I assume, table A does not contain a primary key.

I am unsure how to proceed.

Is it via an update query?

Thanks
 
You should have a PK field in all tables and its vital when running action queries so that Access can correctly identify the records to be altered. In this case which to update.

However you might be able to do an update query based on your unmatched query if you
1. First index one or more fields that will make each record unique
2. Set the update query for unique records =yes.
The query SQL will start UPDATE DISTINCTROW....

For further info and other possible solutions, look at the second part of this article which covers the situation where the import table has no PK
http://www.mendipdatasystems.co.uk/synchronise-data-2/4594514002
 
Last edited:
Hi. Just curious, can you please post the SQL statement for your query? Thanks.
 

Users who are viewing this thread

Back
Top Bottom