How do I set up a trigger in Access 2007?

D

David

How do I set up a trigger in Access 2007?

so that if a field in the master table is update it will automatically
update the other tables that run of the back of the master table

Regards,

David
 
A

Allen Browne

Access has never had triggers, so you can't do this at the table level.

If your records are entered via a form, you can use the form's events
(AfterInsert, AfterUpate, AfterDelConfirm.) For an example of logging by
using these events, see:
Audit Trail - Log changes at the record level
at:
http://allenbrowne.com/AppAudit.html

Microsoft has announced that Access 2010 will support data macros:
http://blogs.msdn.com/access/archive/2009/07/22/access-2010-the-10-000-ft-view.aspx
Perhaps you will be able to do it at the table level when the new version is
released.
 
J

John W. Vinson

How do I set up a trigger in Access 2007?

You can't; they're not supported.
so that if a field in the master table is update it will automatically
update the other tables that run of the back of the master table

You can set "Cascade Updates" on a relationship between the two tables - but
as a rule it's a Bad Idea. It only applies to the Primary Key and generally,
primary keys should be stable so the option of updating them won't apply.

It may be that you have data stored redundantly in two tables... in which case
you need to rethink your table design! What is it that you want updated?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top