SQL query help!

M

Mark Vanderslice

Hi.

I'm trying to update a record in tblA with the sum of amounts from records
in tblB. The amounts in tblB must be filtered on a field in joined table
tblC.

sSQL = "UPDATE tblA SET Amount =
(SELECT Sum(Amount1)
FROM tblB
INNER JOIN tblC
ON tblB.Program = tblC.Program
WHERE tblB.Account='7160' and tblC.Program='Administration')
WHERE tblA.RecordIndex=90010
AND tblA.RecordSubIndex=12"

Docmd.RunQuery sSQL

I'm getting "Operation must use updateable query" error when I run this. Is
this a syntax problem or a limitation of SQL in Access? I'm no SQL expert
but it appears as if it should work...TIA!!!

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top