Results 1 to 4 of 4
  1. #1
    mikehorse is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    9

    Adding date stamp to form comments memo field

    Hi
    I have a form with the purpose of tracking an incident. On the form is a memo-field call "comments", the idea being that each time the incident is updated the user can add a few comments to explain the update..



    What I would like to do is have a button called "add comment" which will add the date (and eventually the username), the user can then add some text, this is then repeated on each subsequent update. Effectively adding a timestamp to each comments entry.

    I have the button and the vba code to add the date;

    me.comments.setfocus
    me.comments.text = Now()

    however when the button is pressed the existing entries in the comments field are replaced with the new date. How can I get this function to not replace the existing entries, but append the date on a new line underneath the existing entries ?

    thanks

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    You don't need the set focus line, just don't use the .Text property:

    me.comments = me.comments & Now()

    likely you'll want to add spaces or whatever, but you get the point.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    mikehorse is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    9
    Hi Paul,
    Thanks for your help.

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    No problem, post back if you get stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 9
    Last Post: 07-21-2014, 11:57 AM
  2. Replies: 3
    Last Post: 12-10-2012, 05:14 PM
  3. Replies: 6
    Last Post: 07-03-2012, 12:27 PM
  4. Date Stamp when a field is changed
    By winterh in forum Access
    Replies: 1
    Last Post: 04-25-2012, 07:27 AM
  5. Adding a Time Stamp to a Form
    By Tomlon in forum Forms
    Replies: 2
    Last Post: 02-03-2012, 08:45 AM

Tags for this Thread

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