cwilson30341
New member
- Local time
- Today, 13:58
- Joined
- Nov 21, 2006
- Messages
- 8
Hello all - I am reletively new to Access and this one has me stumped. I am trying to update records in one table with info from another table and it is not working. A few folks that I have shown this to say it should be working fine.
Here is SQL:
VBA:
UPDATE [RO Data] LEFT JOIN tblCST_CTR_REFN ON
[RO Data].CDE_COST_CENTER = tblCST_CTR_REFN.CST_CTR_ID Set
[RO Data].PRODUCT = IIf([RO Data]![PROD] Like "Equity*","Equity","Non-Equity"),
[RO Data].REGION = [tblCST_CTR_REFN].[HIER3_RGN_ID],
[RO Data].GROUP = [tblCST_CTR_REFN].[HIER3_GRP_ID];
This is the part that is not working:
VBA:
[RO Data].REGION = [tblCST_CTR_REFN].[HIER3_RGN_ID],
[RO Data].GROUP = [tblCST_CTR_REFN].[HIER3_GRP_ID]
Instead of changing the RO Data.REGION and GROUP to what is in the other table, it changes them to REGION and GROUP.
Any help is greatly appreciated.
Chris
Here is SQL:
VBA:
UPDATE [RO Data] LEFT JOIN tblCST_CTR_REFN ON
[RO Data].CDE_COST_CENTER = tblCST_CTR_REFN.CST_CTR_ID Set
[RO Data].PRODUCT = IIf([RO Data]![PROD] Like "Equity*","Equity","Non-Equity"),
[RO Data].REGION = [tblCST_CTR_REFN].[HIER3_RGN_ID],
[RO Data].GROUP = [tblCST_CTR_REFN].[HIER3_GRP_ID];
This is the part that is not working:
VBA:
[RO Data].REGION = [tblCST_CTR_REFN].[HIER3_RGN_ID],
[RO Data].GROUP = [tblCST_CTR_REFN].[HIER3_GRP_ID]
Instead of changing the RO Data.REGION and GROUP to what is in the other table, it changes them to REGION and GROUP.
Any help is greatly appreciated.
Chris