Results 1 to 4 of 4

Thread: Trigger

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Red face Unanswered: Trigger

    I am having trouble in forming and executing a trigger. I am using the following code:

    CREATE TRIGGER ClientDelete BEFORE DELETE
    ON CLIENT FOR EACH ROW
    WHEN State = MD
    INSERT INTO CUSTLOG VALUES ('deleted a MD client') ;

    I'm not sure if I can either run this in Access 2007. I can't get pass the key word Trigger.

    Can someone help me with this?

    Thank You...

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Nope, you can't. Access (or more accurately ACE) does not support triggers. You'll need to handle this in client VBA code.

  3. #3
    Join Date
    Apr 2010
    Posts
    2
    I didn't think so...Thanks for your input.

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    But you CAN setup your relationships in MSAccess so that if the value is changed in 1 table, it cascade updates in the other tables. You would do this in your relational diagram on the join line between the 2 tables where the fields are joined (ie. click on it).
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •