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
 
Back
Top