Operation must use an updatable query

  • Thread starter Pentlavalli via AccessMonster.com
  • Start date
P

Pentlavalli via AccessMonster.com

Hello all,

In my access mdb file, I have a table "LogReport" in which I have to change a
column "instrumentStatus" value from the table "statusMap".

"statusMap" looks as follows with two columns.

fromSta toSta
ABC 123
DEF 456
GHI 789 .....


Column "instrumentStatus" will have ABC or DEF or GHI.

Based on the above mapping table, I have to change "instrumentStatus" to
either 123 or 456 or 789.

I am using the following query for this.

UPDATE LogReport
SET instrumentStatus = ( SELECT toSta
FROM statusMap
WHERE fromSta = LogReport.instrumentStatus ) ;

But when I try to execute (double click) this query, I am getting the error
"Operation must use an updatable query".

Any help in this regard please ....

Sri
 
K

Ken Snell [MVP]

Try this:

UPDATE LogReport
SET instrumentStatus =
DLookup("toSta", "statusMap", "[fromSta] = '" &
LogReport.instrumentStatus & "'") ;
 

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