Hello this is my first post;
I am trying to have an update query update two fields and possibly eliminating the update to one field based on information in a third field. I cannot get the query to work, it either update them both or only one. I have tried several ways using iff or Where statements in the query but am at a loss. I only want the field for the HR Phone Tbl.Emp Id to update if Phone column says yes. I want the Computer Inventory Tbl.emp id to update regardless of the Phone column. This is the current SQL in the query.
UPDATE ([Office Changes 3rd Qry] INNER JOIN [HR PHONE TBL] ON [Office Changes 3rd Qry].[OFFICE CHANGES Tbl].ID = [HR PHONE TBL].[Emp ID]) INNER JOIN [HR COMPUTER INVENTORY TBL] ON [Office Changes 3rd Qry].[OFFICE CHANGES Tbl].ID = [HR COMPUTER INVENTORY TBL].[EMP ID] SET [HR COMPUTER INVENTORY TBL].[EMP ID] = [Office Changes 3rd Qry].[OFFICE CHANGES Tbl_1]![ID], [HR PHONE TBL].[Emp ID] = [Office Changes 3rd Qry].[OFFICE CHANGES Tbl_1]![ID]
WHERE ((([Office Changes 3rd Qry].PHONE) Like "yes"));
I hope someone can help.
I am trying to have an update query update two fields and possibly eliminating the update to one field based on information in a third field. I cannot get the query to work, it either update them both or only one. I have tried several ways using iff or Where statements in the query but am at a loss. I only want the field for the HR Phone Tbl.Emp Id to update if Phone column says yes. I want the Computer Inventory Tbl.emp id to update regardless of the Phone column. This is the current SQL in the query.
UPDATE ([Office Changes 3rd Qry] INNER JOIN [HR PHONE TBL] ON [Office Changes 3rd Qry].[OFFICE CHANGES Tbl].ID = [HR PHONE TBL].[Emp ID]) INNER JOIN [HR COMPUTER INVENTORY TBL] ON [Office Changes 3rd Qry].[OFFICE CHANGES Tbl].ID = [HR COMPUTER INVENTORY TBL].[EMP ID] SET [HR COMPUTER INVENTORY TBL].[EMP ID] = [Office Changes 3rd Qry].[OFFICE CHANGES Tbl_1]![ID], [HR PHONE TBL].[Emp ID] = [Office Changes 3rd Qry].[OFFICE CHANGES Tbl_1]![ID]
WHERE ((([Office Changes 3rd Qry].PHONE) Like "yes"));
I hope someone can help.
Last edited: