Update query syntax help

  • Thread starter Thread starter Jack Sheet
  • Start date Start date
J

Jack Sheet

Hi all
Access 97

I have two tables, "T_Clients" and "T_Tasks".
They share a field "Client_Ref" with a 1 (Clients) to many (Tasks)
relationship.
Clients also contains a Yes/No field called "SA_Return", and Tasks contains
a text field "Task_Type" that may contain various text strings from a list,
one of which is "SA100".

I want to create an Update query that converts to "Yes" the value in
"SA_Return" in each record of table "T_Clients" for which the criteria is
that there is at least one record of the same Client_Ref in table T_Tasks
with the value "SA100" in the field "Task_Type".

Hope that is clear. Currently struggling, and any help gratefully received.
 
UPDATE T_Clients SET T_Clients.SA_Return = True
WHERE (((T_Clients.Client_Ref) IN (SELECT Client_Ref FROM T_Tasks WHERE
Task_Type = 'SA100')));
 
Thanks that worked fine

Brendan Reynolds said:
UPDATE T_Clients SET T_Clients.SA_Return = True
WHERE (((T_Clients.Client_Ref) IN (SELECT Client_Ref FROM T_Tasks WHERE
Task_Type = 'SA100')));
 
Back
Top