Operation must use an updateable query.

H

hfd

Code:

UPDATE dbo_ap_vchr_tbl1 INNER JOIN 2010 ON
(dbo_ap_vchr_tbl1.gl_cmp_key = [2010].gl_cmp_key) AND
(dbo_ap_vchr_tbl1.ap_vchr_key = [2010].voucher) AND
(dbo_ap_vchr_tbl1.ap_vchr_dtltotf = [2010].debit) SET [2010].vendor =
[dbo_ap_vchr_tbl1]![ap_remt_key]
WHERE (((dbo_ap_vchr_tbl1.gl_cmp_key)=[Forms]![Form1]!
[SelectedCompany]) AND (([2010].[memo indicator]) Is Null) AND
(([2010].gl_tran_ref1)="q") AND ((dbo_ap_vchr_tbl1.ap_vchr_type)="i")
AND (([2010].gl_period_id)=[Forms]![Form1]![SelectedPeriod]));



Not sure why I'm getting this error. Does anyone have a solution page
for it?
 
J

John Spencer

UPDATE dbo_ap_vchr_tbl1 INNER JOIN [2010] ON
(dbo_ap_vchr_tbl1.gl_cmp_key = [2010].gl_cmp_key) AND
(dbo_ap_vchr_tbl1.ap_vchr_key = [2010].voucher) AND
(dbo_ap_vchr_tbl1.ap_vchr_dtltotf = [2010].debit)
SET [2010].vendor = [dbo_ap_vchr_tbl1]![ap_remt_key]
WHERE (((dbo_ap_vchr_tbl1.gl_cmp_key)=[Forms]![Form1]![SelectedCompany])
AND (([2010].[memo indicator]) Is Null)
AND (([2010].gl_tran_ref1)="q")
AND ((dbo_ap_vchr_tbl1.ap_vchr_type)="i")
AND (([2010].gl_period_id)=[Forms]![Form1]![SelectedPeriod]));

If you change the query to a select query is the select query updatable?

Do you have primary keys on the two tables? Is 2010 a table or another query.
If it is another query, what is that query? And if it is a query, then is
the 2010 query updatable?

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
J

Jerry Whittle

About the only way that SQL will work is if the combination of fields is the
primary key in one table AND the are joined together in the Relationships
window with Referential Integrity enabled.

You might be able to get it to work using the 2010 table in a subquery
within the WHERE clause.

You can read more about this problem at:
http://support.microsoft.com/?kbid=328828
 

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