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

Update Multiple Tables

100+
P: 132
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
Share this Question
Share on Google+
5 Replies


FishVal
Expert 2.5K+
P: 2,653
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
Expert 100+
P: 114
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

100+
P: 132
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
Expert 100+
P: 184
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

100+
P: 132
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

Post your reply

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