Originally Posted by
The U
unfortunately this gives a syntax error.
It looks like Access doesn't allow to update with calculated values from non-linked tables.
I created a saved query (there were comparisions wrong in my previous example - I corrected them)
Code:
qPK25 =
SELECT p.ID, (SELECT t.TKnumber FROM tblTK25 t WHERE t.north > p.Latitude AND t.south <= p.Latitude AND t.East > p.Longitude AND t.west <= p.Longitude) AS TK25
FROM tblPlaces AS p;
, but when I tried to use it to update tblPlaces
Code:
UPDATE
tblPlaces p INNER JOIN qPK25 q ON q.ID = p.ID
SET p.PK25 = q.PK25
, I got an error again. Access thinks, that qPK25 may have several rows for same ID, and so the query is not updateble.
A probable solution will be a dummy table where data from qPK25 is inserted into, and which has ID defined as primary key. Then you can update the tblPlaces from this dummy table. Or maybe somebody has a better solution?