do loop or sql update

  • Thread starter Thread starter ifoundgoldbug
  • Start date Start date
I

ifoundgoldbug

Greetings

i am having trouble with this sql statment

UPDATE Location SET Location.Location =
IIf(location!updateme=True,Forms!Series!NewLocation,location!Location)
WHERE [location];

it is changing EVERY location to the one at Forms!Series!NewLocation
instead of just the ones where updateme is true. am I missing something
in my statement or can this only be done in a vba do loop?
 
Try:

UPDATE Location
SET Location =Forms!Series!NewLocation
WHERE UpdateMe = True
 

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

Back
Top