Descending Comments in Memo Field

Shellsbells5364

New member
Local time
Yesterday, 20:09
Joined
May 5, 2015
Messages
4
Hello All:

Having some trouble with a memo field. For each record, the notes field is present on the Form.... I added an unbound text box (txtMemoAdd) and a command button (Add New Note). When the button is selected, it adds the note to the Read Only Notes Field and adds a timestamp using the following code:

Me.Notes = Me.Notes & vbCrLf & Now () & VbCrLf & Me.txtMemoAdd
Me.txtMemoAdd = ""

The note is added to the bottom, and I was wondering if there was a way to make the new note go to the TOP of the field (Descending Order rather than Ascending).

Many Thanks!

Shellsbells :o
 
You could try adding Top to your code.
Example: Me.Notes.Top

Untested .
 
try changing the order of your string creation

Me.Notes = Now () & VbCrLf & Me.txtMemoAdd & vbCrLf & Me.Notes
 
Sounds like you needs a notes table. Not only does what you do break normalization, it doesn't lend itself to working in the manner you want it to.

If you have a seperate table for notes which also stores the date of the note, this becomes a simple subform which you can order any manner you want.
 
Thanks for the quick responses everyone! CJ_London, your suggestion worked! =)
 
I often do this for occasional notes.
Just a single memo field, which is generally non-editable.
Very easy to implement.

I agree with plog - if you want to find all the notes for a given day, say, you need a different solution, but for a quick solution, this is OK too.
 

Users who are viewing this thread

Back
Top Bottom