How to cascade delete and update related records in Access?

0
129

Access is one of the best programs that exist to manage your database properly. Because this not only brings the normal functions of other programs, but also implements its own (such as being able to create reports or the possibility of creating forms and queries). With that in mind today you will learn how to cascade delete and update related records in Access?

If you don’t know this function or process, then it’s your lucky day, because here you will get all the information you need. Since this is really a great help to simplify various jobs, which you probably have not been doing as well as you should (it is always good to learn something new).

What is the use of cascading delete?

The first thing you need to know before starting the process that will help you determine the answer to How to cascade delete and update related records in Access?, is what this option is for.

Basically what both delete and cascade update do (they’re pretty much the same thing), is delete or replace an item from a related row, causing a chain reaction to apply the changes to the other table.

This is very useful, because it allows you to automatically delete the records, without having to select one by one in each table. It should be noted that the best thing about this process is that it does not touch the source or base code, since it is an internal function designed precisely to automate the work.

black keyboard pillow

This option is good to use, because trying to delete a row will not trigger the integrity error (which occurs because there are several data related to each other). Some examples of what kind of jobs it can be used in would be:

In the register of continents (that you have as a country relationship), in lists of employees, among others. The reality is that you can apply it wherever you want. Note however that the downside of using this process is that you won’t recover the data in the case of a delete (you won’t have the other backup table), so be careful when making changes.

How to cascade delete and update related records in Access?

As you now have more information about how the Cascade option works, it is time for you to see how to do it, so that you finally know the answer to the question: How to delete and update related records in Access in cascade? But before that, you have to keep in mind that in order to follow the steps correctly you must know how to create, modify or execute a query in the program (so you don’t get lost among so many buttons).

The first thing you have to do is go to the “Database Tools” tab. From there to the group named “Relationships”, in this choose the option that bears the same name.

Then in the “Relationships” group of the “Design” tab, click on “All relationships”, with this action a list of all the tables that have some relationship will appear (these will have their respective relationship line).

Then click on the relationship line of the table to which you want to make a change (when it is selected it will become thicker). Then double click on that line, or select the “Tools” option from the group called “Design”, and there choose “Modify relations”.

access interface in red wine

Thanks to that, you will skip the modification dialog. Within it there will be two boxes, one will be called “Cascade update related fields” and the other “Cascade delete related records”. Enable the one you want to use (it can be both). Then click on “Accept”, with that everything should be ready, so your table should already be modified as you wanted.

As a small conclusion…

With that last thing you saw, you already solved the question: How to delete and update related records in Access in cascade?, so there is nothing left for you to do here. Remember that in this program, you can do many things. So it wouldn’t hurt if you learned more about him. For example, obtaining knowledge of how to join or combine databases, among other things.

Previous articleHow to see the layers of images in PowerPoint? – Fast and easy
Next articleThis change in the Epic Store lets you see all your games at once