Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2016
    Posts
    6

    Unanswered: Update date using macro/trigger

    I am trying to have a date field in a table that is automatically updated every time the record is updated. Tried using a macro but no luck. What is the best way to do this?

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    630
    Provided Answers: 34
    In the form property,
    AFTERUPDATE event
    Click the ellipsis button ,far right of that event box,
    Select code,
    Put the textbox to update,

    Code:
    Sub form_afterupdate()
      TxtDate= now()
    End sub

  3. #3
    Join Date
    Nov 2016
    Posts
    6
    I am doing direct manipulation on the table itself. Is it not possible to assign a macro after update? I have tried using the Table Tools - Table - After Update but 'Show All Actions' is greyed out and I don't have access to SetValue.

  4. #4
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    1,101
    Provided Answers: 17
    MS Access does not support triggers.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

  5. #5
    Join Date
    Nov 2016
    Posts
    6

    Updating value on table

    I am actually looking to do this on the table itself rather than a form.


    Quote Originally Posted by ranman256 View Post
    In the form property,
    AFTERUPDATE event
    Click the ellipsis button ,far right of that event box,
    Select code,
    Put the textbox to update,

    Code:
    Sub form_afterupdate()
      TxtDate= now()
    End sub

  6. #6
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,482
    Provided Answers: 11
    Quote Originally Posted by vitale_mike View Post
    I am doing direct manipulation on the table itself. Is it not possible to assign a macro after update? I have tried using the Table Tools - Table - After Update but 'Show All Actions' is greyed out and I don't have access to SetValue.
    NOT A GOOD Idea to PLAY in the Tables itself

    U can create a form that looks like a Table View
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

Posting Permissions

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