What is wrong with my query

  • Thread starter Thread starter Kristof Ternoey \(
  • Start date Start date
K

Kristof Ternoey \(

I need to update my table with a update command and a select command. I'm
sure it will work in SQL but how do I manage this in access

Here is my code:

UPDATE tblDemeUsers SET tblDemeUsers.D_localadminpassword = (select FIELD3
from tblser2 WHERE tblser2.field2=tbldemeusers.d_userid;);

The error is : operation must use an updateable query?

Urgent
thx
 
I need to update my table with a update command and a select command. I'm
sure it will work in SQL but how do I manage this in access

Here is my code:

UPDATE tblDemeUsers SET tblDemeUsers.D_localadminpassword = (select FIELD3
from tblser2 WHERE tblser2.field2=tbldemeusers.d_userid;);

The error is : operation must use an updateable query?

Urgent
thx

Do you have a Primary Key defined on d_UserID (or Field2)?

Try

UPDATE tblDemeUsers INNER JOIN tblser2
ON tblSer2.Field2 = tblDemeUsers.d_userID
SET tblDemeUsers.D_localadminpassword = tblSer2.Field3;

John W. Vinson[MVP]
 
Back
Top