Update Query not Updating

G

Guest

I'm trying to update tblEmployees based on the values in tblOptum_NonOps
based on a matching employee ID. The query runs, but the update isn't
happening - there are no error messages.

Here's the SQL

UPDATE tblEmployees INNER JOIN tblOptum_NonOps ON tblEmployees.ID =
tblOptum_NonOps.ID SET tblEmployees.[New GL Bus Un] = tblOptum_NonOps![New GL
Bus Un], tblEmployees.[New GL Loc Cd] = tblOptum_NonOps![New GL Loc Cd],
tblEmployees.[New GL Func Cd] = tblOptum_NonOps![New GL Func Cd],
tblEmployees.[New GL Prod Cd] = tblOptum_NonOps![GL Prod Cd],
tblEmployees.[New GL Cust Cd] = tblOptum_NonOps![New GL Cust Cd],
tblEmployees.[New GL User] = tblOptum_NonOps![New GL User];

Any issues with the code?
 
G

Guest

No, DISTINCTROW didn't work, but I rewrote the query to include a . (period)
instead of a ! (exclamation point) in the SET statement. Now it works as
expected - I don't know why it works, but it does.

UPDATE tblEmployees INNER JOIN tblOptum_NonOps ON tblEmployees.ID =
tblOptum_NonOps.ID SET tblEmployees.[New GL Bus Un] = [tblOptum_NonOps.New GL
Bus Un], tblEmployees.[New GL Loc Cd] = [tblOptum_NonOps.New GL Loc Cd],
tblEmployees.[New GL Func Cd] = [tblOptum_NonOps.New GL Func Cd],
tblEmployees.[New GL Prod Cd] = [tblOptum_NonOps.New GL Prod Cd],
tblEmployees.[New GL Cust Cd] = [tblOptum_NonOps.New GL Cust Cd],
tblEmployees.[New GL User] = [tblOptum_NonOps.New GL User];


Michel Walsh said:
Hi,



Adding DISTINCTROW helps?



Hoping it may help,
Vanderghast, Access MVP


Kirk P. said:
I'm trying to update tblEmployees based on the values in tblOptum_NonOps
based on a matching employee ID. The query runs, but the update isn't
happening - there are no error messages.

Here's the SQL

UPDATE tblEmployees INNER JOIN tblOptum_NonOps ON tblEmployees.ID =
tblOptum_NonOps.ID SET tblEmployees.[New GL Bus Un] = tblOptum_NonOps![New
GL
Bus Un], tblEmployees.[New GL Loc Cd] = tblOptum_NonOps![New GL Loc Cd],
tblEmployees.[New GL Func Cd] = tblOptum_NonOps![New GL Func Cd],
tblEmployees.[New GL Prod Cd] = tblOptum_NonOps![GL Prod Cd],
tblEmployees.[New GL Cust Cd] = tblOptum_NonOps![New GL Cust Cd],
tblEmployees.[New GL User] = tblOptum_NonOps![New GL User];

Any issues with the code?
 

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

Similar Threads


Top