I have a table, and I want to set all the cells in the row "State_Abbr" = "MN" How can I do this?

  • Is "State_Abbr" the field name or a value in a field? Becuase if it is a value and you went to update all the cells then the value "State_abbr" would be overwritten. If this is not the case, then see my answer. – Robert Leckie Oct 8 '10 at 21:50

State_Abbr sounds like a field name. If that is the case then you will just need to do a simple sql update. You should be able to go into the query editor, switch to sql and then type in what is below. Remember to replace the section in brackets with your table name.

update [table name here] set state_abbr = "MN" where (state_abbr is null or state_abbr is not null)
  • What is the point of that where (state_abbr is null or state_abbr is not null) clause? It's extraneous. – ta.speot.is Oct 9 '10 at 0:41
  • I haven't used access in a long time and I couldn't remember if you left a where clause off did it match every record or threw an error so I put something in that would match everything. – Robert Leckie Oct 9 '10 at 1:46
  • your memory of how Access worked when you used it in the past is faulty. Access has never worked that way. – David W. Fenton Oct 9 '10 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.