473,503 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update Multiple Tables

132 New Member
I have an Access database that contains multiple tables. How can I update a field in all of the tables with a search and replace funtion? In other words, one of the forms has a button that will allow the user to update a primary key that may have been mis-keyed from the start. The idea is that the user would have the ability to correct the mistake by searching for the incorrect key and replacing it with the correct key. To do this, 5 or so tables would have to be updated.
Jul 11 '07 #1
5 2380
FishVal
2,653 Recognized Expert Specialist
I have an Access database that contains multiple tables. How can I update a field in all of the tables with a search and replace funtion? In other words, one of the forms has a button that will allow the user to update a primary key that may have been mis-keyed from the start. The idea is that the user would have the ability to correct the mistake by searching for the incorrect key and replacing it with the correct key. To do this, 5 or so tables would have to be updated.
Hi!

DRI (Declarative referrential integrity) is all what you need to update/delete FKs when PK updated/deleted.
Jul 12 '07 #2
damonreid
114 Recognized Expert New Member
I don't have any information on this but would like to subscribe to the topic. I don't know how to without posting in it, sorry.
Jul 12 '07 #3
Proaccesspro
132 New Member
Hi!

DRI (Declarative referrential integrity) is all what you need to update/delete FKs when PK updated/deleted.

Can you expand a little on the concept and where I could find more information on it?
Jul 12 '07 #4
hyperpau
184 Recognized Expert New Member
Can you expand a little on the concept and where I could find more information on it?
this means you have to open the relationships window form access.

meaning, no form, tables, querios or reports are open. then you click the relationships button from the toolbar.

Then you double click the lines that connects your tables in that window and then check the checkbox that says referrential integrity. then 2 more check boxes will be enabled "cascade delete" and "cascade update". Just check on those and click ok.

now everytime a PK is edited or deleted in one table, all the tables that has that PK are updated or deleted as well.
Jul 12 '07 #5
Proaccesspro
132 New Member
Can you expand a little on the concept and where I could find more information on it?

I found some information regarding the subject....OK, so do you have any ideas on the best way to integrate this functionality?? I would rather not use the standard search and replace box offered in Access to accomplish this.
Jul 12 '07 #6

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

Similar topics

17
4971
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by...
1
2985
by: Wing | last post by:
Hi all, I have created 2 tables in sql database and join these 2 tables before assign the result to the dataset, and display the result in datagrid. Everything is fine up to this point. The...
9
12952
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
1
1558
by: Foef | last post by:
When I have a stored procedure, with multiple tables in MS Access, in a dataset and I change it in my DataGrid, I get the next message when I want to update my DataSet: ...
1
3080
by: CS | last post by:
I need to update multiple tables from one form using a command button. The info from the different text boxes should then go into the tables. Can someone help me with some example code on how to...
6
4662
by: shil | last post by:
Hi, I am writing a windows app in .net 2003. I have a datagrid which gets data from a storedprocedure. My question is how can I update the data in the datagrid? I want to call another...
1
2072
by: andrewcw | last post by:
I have just 1 table that I am updating, the SQL I use to generate the DataTable is complex using multiple tables, however when I view the fieldnames of the DataTable from the DataSet - everything...
10
3267
by: frizzle | last post by:
Hi there, I'm building a music site with a mysql backend. It has a many to many relational database. I use this to match music genres with certain artists, to maintain the possibility to add...
4
2340
by: dstorms | last post by:
I'm trying to run an update query on multiple tables, and since Access doesn't allow me to update tables from a union query, I'm writing a module as a workaround. So I've set up a temporary recordest...
5
4056
by: Bogdan | last post by:
Hi, I have a stored procedure that uses JOINs to return columns from multiple tables. I also have another stored proc that that takes a series of params and updates multiple tables. I used the...
0
7204
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
7091
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
7464
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
5586
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,...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4680
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
3171
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
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.