Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Excel via Access error

Status
Not open for further replies.

vanessa03

Technical User
May 13, 2003
110
US
I want to update a linked excel file in Access with a field from a linked SQL table. This is the query.
UPDATE BudgetUpload INNER JOIN dbo_IMITMIDX_SQL ON BudgetUpload.[Item No] = dbo_IMITMIDX_SQL.item_no
SET BudgetUpload.[Prod Cat] = dbo_IMITMIDX_SQL.prod_cat;

I get the error message - Cannot update'(expression)'; field not updateable.

Any help would be greatly appreciated. Thanks.
 
A bit if a guess - have you got a unique index on either table?
 
The IMITMIDX_SQL has an identity index. But the excel file doesn't have one.
 
instead of a linked table use this syntex

Code:
UPDATE [Excel 8.0;IMEX=0;DATABASE=filepathandname].[workshertname$] AS BudgetUpload  
INNER JOIN dbo_IMITMIDX_SQL ON BudgetUpload.[Item No] = dbo_IMITMIDX_SQL.item_no 
SET BudgetUpload.[Prod Cat] = dbo_IMITMIDX_SQL.prod_cat;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top