Forum Discussion
Tony2021
Oct 01, 2022Steel Contributor
Update Query
Hello experts, I have an update query SQL below and I am getting an error message. Do you see anything obviously wrong with it? I am not sure why I am getting that error msg in the screen shot. ...
- Oct 02, 2022UPDATE tblFXParent SET DateSettleC = DLOOKUP("LastOfDateSettle", "qryFXSettDtCLast", "IDParentfk = " & [IDFXParent])
XPS35
Iron Contributor
I guess qryFXSettDtCLast is not updateable (looks like an aggregate qeury). That will make your update query not updateable.
Tony2021
Oct 01, 2022Steel Contributor
Ok that makes sense. qryFXSettDtCLast is an aggregate query. Do you happen to know of a workaround? I definitely need to update tblFXParent.DateSettleC to the LAST of Date Settle as found in [qryFXSettDtCLast]
If it helps, below is my sql of qryFXSettDtCLast
SELECT tblFXRollsChild.IDParentfk, Last(tblFXRollsChild.DateSettle) AS LastOfDateSettle
FROM tblFXRollsChild
GROUP BY tblFXRollsChild.IDParentfk;