Results 1 to 5 of 5
  1. #1
    Magnus1982 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2017
    Posts
    29

    I am new. I have first Question

    Hi All,



    I am from Poland. I just started learn Access . I have first block... sombody will help?

    1. I wanna to write down in some record for example name but in another record i wanna have automatic generated date of write this name. If i will change this name in the future the date should change to day when i made modyfication. I already made tabel and from and field where should generate the modification date but i don't know formula or makro which i have to use to do that.Tnx for any help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    If you care about keeping history of the name changes, sounds like an audit log. Review http://allenbrowne.com/AppAudit.html

    If you don't care about history, then just have date field in the same table and code to set the date when the name changes. VBA code in the control's AfterUpdate event, like:

    If Me.[controlname].OldValue <> Me.[controlname] Then Me.[date fieldname] = Now()
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Magnus1982 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2017
    Posts
    29
    Yea is working. But only after update this filed . It should alsow put date when you wrtiting first time.

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    the 'default value' in table design needs to be "=date ()". that way by default. any new record will show that days date.

    I'm sure Junes suggestion is a more elegant solution to update. But you can have a look how update query's work too.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    If you want full data and time, use Now().
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-25-2012, 07:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums