I have two tables named [Insert_Record] and [Delete_Record] in MS Access. Both tables have the same fields but one table has records whereas another table has no record.
Question: I want, whenever I delete any record from the table [Insert_Record] that entire record should automatically insert into another table, i.e: [Delete Record].
How can I accomplish this?
Working with Triggers - MS Access. SQL Server triggers are another very clever feature that allows for some very powerful programing. Access has data macros, which are similar to triggers, but they do not support a transactional model, which is an inbuilt feature of SQL Server triggers.
You can open a trigger to view or edit the text of an existing trigger that is stored in your database. Triggers are scripted in Transact-SQL for Microsoft SQL Server databases. under Objects. Right-click the name of the table whose trigger you want to open and choose Triggers from the shortcut menu.
Triggers allow you to perform the following tasks: Enforce business rules. Validate input data. Generate a unique value for a newly inserted row on a different file (surrogate function)
Access 2010 introduced event-driven Data Macros that are similar to triggers. The process described in the question can easily be done with an After Delete data macro on the [Insert_Record] table:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With