snoopy92211
New member
- Local time
- Today, 17:37
- Joined
- Feb 25, 2005
- Messages
- 7
This is driving me NUTS!!
I am trying to update a table based on an inner join. Do update tables have to be based on primary keys? arrrh!
the error is saying that my syntax for the update is incorrect. PLEASE HELP!

(ALL and mpslocations are tablenames, respectively)

I am trying to update a table based on an inner join. Do update tables have to be based on primary keys? arrrh!
the error is saying that my syntax for the update is incorrect. PLEASE HELP!

(ALL and mpslocations are tablenames, respectively)
Code:
db.Execute "Update ALL
INNER JOIN MPSLocations ON ALL.Location_Code=MPSLocations.LocationCode
& "Set ALL.LocationAddress = MPSLocations.StreetAddress, " _
& "Set ALL.LocationCity = MPSLocations.City, " _
& "Set ALL.LocationState = MPSLocations.State, " _
& "Set ALL.LocationZip = MPSLocations.Zip, " _
& "where ALL.Location_Code <> MPSLOCATIONS.LocationCode"