By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,307 Members | 1,929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,307 IT Pros & Developers. It's quick & easy.

Getting data from Related parent table

P: 1

I have 2 tables in one Access database: Contact Db and Client Db. I want to update Contact Db and set the field CompanyName equal to the related Client's Name (field: Name1) if it is does not already have a value.

I have written this:
UPDATE [Contact Db]
SET CompanyName = [Client Db].Name1
WHERE Len(Nz(CompanyName)) = '0'
AND [Contact Db].ClientNumber = [Client Db].CustomerNumber;

And it pops up asking me to "Enter Parameter Value" for Client Db.Name1...

Why? and what am I doing wrong?
Oct 9 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 8,679
Sorry! The old Double Post again!
Oct 9 '08 #2

Expert 5K+
P: 8,679
Expand|Select|Wrap|Line Numbers
  1. UPDATE [Contact DB] INNER JOIN [Client DB] ON [Contact DB].ClientNumber = [Client DB].CustomerNumber SET [Contact DB].CompanyName = [Name1]
  2. WHERE [Contact DB].CompanyName Is Null;
Oct 9 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.