Question : Update query syntax

Found examples on EE, and built my own update query, but cant figure why it wont work.

Updateing table "tblStock" from a select query "qry StkInDetails Grouped"


**ACCESS 2007
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
UPDATE ts 
SET ts.pc = tn.pcs
FROM tblStock AS ts 
 
INNER JOIN 
[qry StkInDetails Grouped] AS tn 
ON (ts.pkg = tn.pkgs) 
AND (ts.PartNo = tn.PartNo) 
AND (ts.Brand = tn.Brand) 
AND (ts.Category = tn.Category) 
AND (ts.Location = tn.Location)
WHERE (((ts.pkg)=0))

Answer : Update query syntax

sorry, in ms access the syntax is indeed a bit different than ms sql server:
1:
2:
3:
4:
5:
6:
7:
8:
9:
UPDATE tblStock AS ts 
INNER JOIN [qry StkInDetails Grouped] AS tn 
ON ((ts.pkg = tn.pkgs) 
AND (ts.PartNo = tn.PartNo) 
AND (ts.Brand = tn.Brand) 
AND (ts.Category = tn.Category) 
AND (ts.Location = tn.Location)) 
SET ts.pc = tn.pcs
WHERE (ts.pkg=0)
Random Solutions  
 
programming4us programming4us