Update query not working (1 Viewer)

MadCat

Registered User.
Local time
Today, 15:04
Joined
Jun 24, 2003
Messages
62
Hi all,

I'm sure this is easy to do but for some reason i just cannot get it working. Hopefully someone here can tell me where i'm going wrong.

I have two tables in a database and the have a linking unique field. I want to update a column in one table from a column in another where the linking ID field matches.

Here's what i have at present.

Code:
Update Table_1 inner join Table_2 On Table_1.ID = Table_2.ID
Set Table_1.[CHI Number] = [Table_2]![CHI_No]

This is just returning the CHI Number column as blanks instead of what i expected would be the same as Chi_No.

Can anyone shed some light on this for me?

Thanks in advance
 

FoFa

Registered User.
Local time
Today, 09:04
Joined
Jan 29, 2003
Messages
3,672
If you are running the query in design view to see it, it only returns what's in the columns TO BE UPDATED, not the values that WILL BE IN the column after the updates.
Misleading, sure, but the way it is.
 

MadCat

Registered User.
Local time
Today, 15:04
Joined
Jun 24, 2003
Messages
62
I see. That seems a wee bit daft but never mind. The query is indeed working. SHouldn't have ovelooked that fact.

Thanks for your help.
 

Users who are viewing this thread

Top Bottom