New update comments in order of latest at top

  • Thread starter Thread starter Bartman
  • Start date Start date
B

Bartman

Hi can anyone help me?

I basically have a comment box on a form, were I need to move down new
text entered to the line below.
So each time a text update is added, it always moves the update to the
line below in order of newest comments at the top.

Thanks Chris
 
Control-Enter will insert a new line into a textbox. Do you want more
automation than this?

Barry
 
Hi Barry,

Yes I basically need the comment box to drop down a line ensuring the
latest comment is always at the top. i.e descending order of input.

This will need to be automated as I have any comments updated with the
user name and the date the comment was added.

This is the code I am using at the moment but the new line always
appears under the new text.:

Private Sub Task_Update_AfterUpdate()
Me.Task_Update = Me.Task_Update & " Task updated on: " & Date & " " &
"By user name:" & " " & Me.Nstamp2.Value & Chr(13) & Chr(10)
Chr (10) & Chr(13)
End Sub

Thanks
 
I would recommend a different approach. Move the comments to a new table with
a relationship to this table. Expose the comments table in a subform. This
way, each entry will be a new record, you can apply defaults to fields, sort
the subform by date, query against fields (e.g., all comments by a particular
user), etc.

If you stay with the memo field approach, I think you need to rearrange a bit:

Me.Task_Update = " Task updated on: " & Date & " " & "By user name:" & "
" & Me.Nstamp2.Value & Chr(13) & Chr(10) & Me.Task_Update

Barry
 
Thanks very much Barry!
Regards

Chris

Barry said:
I would recommend a different approach. Move the comments to a new table with
a relationship to this table. Expose the comments table in a subform. This
way, each entry will be a new record, you can apply defaults to fields, sort
the subform by date, query against fields (e.g., all comments by a particular
user), etc.

If you stay with the memo field approach, I think you need to rearrange a bit:

Me.Task_Update = " Task updated on: " & Date & " " & "By user name:" & "
" & Me.Nstamp2.Value & Chr(13) & Chr(10) & Me.Task_Update

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top