Results 1 to 6 of 6
  1. #1
    teknq is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    2

    Angry How to insert a date in the first position of a memo box

    I am having some headaches on how to insert a date into a memo box in the 1st position of the box AFTER new notes have been added. also, I don't want to delete any existng notes already entered. I have looked high and low and still can't locate a fix for my situation. The only code that works for me is populating the current date but not in the right postion. The whole purpose of this is to maintain a running log of notes which are separated by dates. Any help with this challenge would be much appreciated. Thanks a million.

    Private Sub LGCMTS_GotFocus()
    [LGCMTS].SelStart = 0
    End Sub

    Private Sub LGCMTS_AfterUpdate()


    [LGCMTS] = [LGCMTS] & Now() & "> "
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    So reverse the order:

    [LGCMTS] = Now() & "> " & [LGCMTS]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    teknq is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    2
    Thank you so much Paul would have never thought of that and so simple. You guys are awesome!! Also, how would I change the long date to a short date format?

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If you just want the 'date' portion, use Date() instead of Now(). You really should only use Now() when the time portion is actually needed.

    Linq ;0)>

  5. #5
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Format(Date(),"Short Date")

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help, and welcome to the site by the way!
    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. checkbox to insert date
    By efk0107 in forum Forms
    Replies: 6
    Last Post: 01-17-2015, 11:41 AM
  2. Insert a new record in a particular position in a table?
    By accessorizer in forum Programming
    Replies: 7
    Last Post: 04-07-2012, 04:21 PM
  3. Insert date function
    By geraldk in forum Forms
    Replies: 2
    Last Post: 01-01-2012, 06:37 PM
  4. Two Date/Time and Memo Fields
    By Luke in forum Access
    Replies: 3
    Last Post: 08-24-2011, 02:55 PM
  5. SQL INSERT INTO Date Syntax Error
    By tuna in forum Programming
    Replies: 5
    Last Post: 08-10-2010, 06:17 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