473,503 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting data from Related parent table

1 New Member
Hi,

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
2 1062
ADezii
8,834 Recognized Expert Expert
Sorry! The old Double Post again!
Oct 9 '08 #2
ADezii
8,834 Recognized Expert Expert
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

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

Similar topics

5
1389
by: Scott Reynolds | last post by:
Hello! I developed a web application to display results from the database. Now I need to add search function, to search, sort and filter data. My question is, which way is better... 1)...
11
6641
by: Kay | last post by:
Hi all, I have populated a dataset with several tables, say - Roster, Agent and few more . The dataset is used to populated a listview with some shift info.. I think I'm sucessfully created a...
13
10086
by: dbuchanan | last post by:
Hello, Here is the error message; ---------------------------- Exception Message: ForeignKeyConstraint Lkp_tbl040Cmpt_lkp302SensorType requires the child key values (5) to exist in the...
5
6408
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
2
1618
by: Bob | last post by:
I got three related datagrid views one parent and two children of the same. The two child tables contain many thousands of records and some of the contents are bitmap files in a sql server...
4
3289
by: HLCruz via AccessMonster.com | last post by:
I am working with a database that has client information separated in to 4 related tables - tFolder, tAddress, tEmail, tPhone number. In addition there are related tables tGifts and tCalls. The...
5
2257
by: strawberry | last post by:
In the function below, I'd like to extend the scope of the $table variable such that, once assigned it would become available to other parts of the function. I thought 'global $table;' would solve...
5
7160
by: ManningFan | last post by:
This is something I haven't come across yet, but it's something I need to do. Don't ask why, it's just got to get done. I need to keep a table of all changes to a specific field in another...
2
1563
by: Dawnyy | last post by:
I'm in desperate need of knowing how I can bind my data grid so that I have the following Customer ID - parent table Customer Name - parent table Status ID - parent table Status Description -...
3
4855
by: esmith2112 | last post by:
I have a non-performing query and am in need of tip or two to melt the brain freeze I'm currently experiencing to get around it. I have a large parent table, with an even larger child table...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.