Results 1 to 6 of 6
  1. #1
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121

    How to create a comment box with time and date stamp in Access

    I have created a small database to add comments of users who works on it. I should be like facebook comments you just add it new comments come on top and old comments show below with date and time. Can we do in access form I am sure it would be using VBA code. Thanks in advance.



    I created a form there's a comment box, a text box below it and a button. When you enter text into the text box and click the button it adds the text to the comment box and time/date stamps it



  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    What happens to the comments once they are entered? They must be stored on a table somewhere. Add a field to that table with Date/Time type, with a default value of Now(). Then display that field next to each comment, and in the record source for the form sort it by this new field DESC.

    You can also add the user, i.e. who entered each comment if you wish.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    And if you don't want users to edit the value set textbox Locked Yes and TabStop No.
    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.

  4. #4
    adnancanada is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    121
    Quote Originally Posted by aytee111 View Post
    What happens to the comments once they are entered? They must be stored on a table somewhere. Add a field to that table with Date/Time type, with a default value of Now(). Then display that field next to each comment, and in the record source for the form sort it by this new field DESC.

    You can also add the user, i.e. who entered each comment if you wish.
    Yes I want to store all comments.

  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,898
    Form is bound to table? What is data structure? Why is button and code needed?
    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.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    How structured do you want the comments to be?
    I once had a database (I think it was called jobjar where users could add comments to jobs/tasks)
    It used a memo field (not really recommended, but this is for concept only) and when someone had a new comment the process was to
    extract the current memo text, add the current date and time to text box , and the username, and the new comment and then concatenate the just extracted text back into the memo field along with necessary vbCrLF.

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

Similar Threads

  1. Time/Date stamp Location
    By Western_Neil in forum Database Design
    Replies: 6
    Last Post: 07-10-2016, 09:29 AM
  2. Stamp date, time and user?
    By ricanos in forum Modules
    Replies: 1
    Last Post: 04-06-2016, 08:41 AM
  3. Replies: 1
    Last Post: 04-01-2015, 01:29 AM
  4. Replies: 9
    Last Post: 07-21-2014, 11:57 AM
  5. Date and Time Stamp
    By zoooza84 in forum Access
    Replies: 2
    Last Post: 08-06-2011, 04:53 AM

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