Results 1 to 8 of 8
  1. #1
    accote is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    35

    Question Access 2010 Memo Field, add new entry on top

    Hello All and thank you for any advice you can give me to get this to work.

    I have an unbound field called txtMemoAdd
    and a Memo field called Notes
    What I like to do is for the text entered into the Text Box (txtMemoAdd) to
    add any new entries at the top in the Memo field (Notes)

    I have a code for the txtMemoAdd field which will enter the date and a blank line after
    update, but I can not figure out how to get the new entries to be on top.



    Please note that my memo field is in rich text so not every code will work.

    Code I have now:

    Private Sub txtMemoAdd_AfterUpdate()
    Me.Notes = Me.Notes & Now() & Me.txtMemoAdd & "<BR>"
    Me.txtMemoAdd = ""
    End Sub


    Which looks like this in the memo field:

    09/23/2012 3:28:39 PM

    First New Note


    09/23/2012 3:28:53 PM
    Another New Note


    09/23/2012 3:29:11 PM
    Last New Note


    How do I get it to have the last entry "Last New Note" to show on top?

    Thanks

    accote

  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,521
    Just change the order of items in the concatenation.

    I deleted your other thread; please don't post the same question twice.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    accote is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    35
    Sorry, didn't mean to post it twice, don't know how that happened.

    I'm not sure what you mean by "the order of items in the concatenation" where would I find that?

    Thank You


    Quote Originally Posted by pbaldy View Post
    Just change the order of items in the concatenation.

    I deleted your other thread; please don't post the same question twice.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I mean here:

    Me.Notes = Me.Notes & Now() & Me.txtMemoAdd & "<BR>"

    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    accote is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    35
    Thanks for the follow up, I may not have explained right, I don't want to group or combine the entries.
    I like to have any new entries be at the top of the list. The way I have my code now is perfect it just
    doesn't order them, so as notes get entered the old ones are always on top, and if there are a lot of
    entries one would have to scroll to the bottom to read the last entry made.
    Hope that makes sense. Basically I'd like to order them by newest on top, but because it is a memo
    field there is no option for that.
    I was hoping there is some code that I could add to mine to accomplish that.

    Click image for larger version. 

Name:	Untitled-1.jpg 
Views:	16 
Size:	103.5 KB 
ID:	9253


    Quote Originally Posted by pbaldy View Post
    I mean here:

    Me.Notes = Me.Notes & Now() & Me.txtMemoAdd & "<BR>"


  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,521
    This:

    Me.Notes = Me.Notes & Now() & Me.txtMemoAdd & "<BR>"

    Says "take the existing note and add the current date/time and this new memo info to it. Don't you think that reversing that to

    Me.Notes = Now() & Me.txtMemoAdd & "<BR>" & Me.Notes

    would accomplish what you're asking?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    accote is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    35
    Thank you very, very much, this does work.
    I've been messing with this all day, still kind of new at this, you're a live saver.

    Thanks again



    Quote Originally Posted by pbaldy View Post
    This:

    Me.Notes = Me.Notes & Now() & Me.txtMemoAdd & "<BR>"

    Says "take the existing note and add the current date/time and this new memo info to it. Don't you think that reversing that to

    Me.Notes = Now() & Me.txtMemoAdd & "<BR>" & Me.Notes

    would accomplish what you're asking?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem.
    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. Excel Import field truncation problem (to Access Memo field)
    By jhrBanker in forum Import/Export Data
    Replies: 6
    Last Post: 07-27-2012, 08:52 AM
  2. Selective Data Entry in access 2010 Forms
    By Fabricio Sanches in forum Forms
    Replies: 3
    Last Post: 02-22-2012, 12:16 PM
  3. Replies: 2
    Last Post: 05-11-2011, 09:06 AM
  4. Replies: 6
    Last Post: 05-05-2011, 08:50 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