Mar 10 2005, 07:42 PM
I'm a novice Access user. Currently, I am interested in experimenting with the theory and script underlying triggers. As I peruse the Access help module, it appears Access doesn't contain trigger commands for databases (mdb). It does accept such commands for projects (adp). I think I need SQL server to create such projects (adp), and I do not have the software. In order to familiarize myself with the functionality of triggers, can I practice using Access mdb's? Would that require using basic SQL language? Is there a book(s) or online documentation that one would recommend to learn more about trigger functionality and script as it pertains either to SQL or Access?
Your attention to these questions is sincerely appreciated.
Mar 11 2005, 10:27 AM
A major use of triggers in SQL is in implementing cascading deletes and cascading updates. A way to practice in Access would be to take a copy of Northwind, change the relationships so that there is no cascading deletes or updates between the tables (keep the relationships though and keep R.I. enforced). Then build a form/subform combination that shows Orders and Order Details. Place a delete button on the form. Attach to the click event of the button code that will delete the records on the many side of the relationship. I would suggest a delete query that takes as its parameter the "one" side key of the record you are deleting. Then build a macro that runs that query. On the click event of the delete button, run the macro.
There are also any number of good SQL books that go into Triggers.