Access 2003 Memo Fields

  • Thread starter Thread starter Timothy Millar
  • Start date Start date
T

Timothy Millar

I have a memo field that end users enter in data. During the course of a day
multiple users would enter in additional or updated information. When the
end users enters the memoe field I have the date and time automatically
populate at the end of the previous users entry. I now need a way to enter
in a space or line so there is a break between the previous user's entry and
the current user's entry. Thank you
 
Just concatenate vbcrlf (the VBA keyword for carriage return/line feed) twice
wherever in the field you need it, e.g.:

txtMemo = txtMemo & dateYouAreAdding & vbcrlf & vbcrlf
 
Realistically, you're violating database normalization rules by putting
multiple pieces of data into a single field. You'd be best off storing each
comment as a separate line in a second table related to your existing table.

If you cannot (or will not) correct your design, you can add a carriage
return/line feed combination to the end of the memo field after you save it
using code like the following in the memo field's AfterUpdate event:

Private Sub YourMemoFieldControl_AfterUpdate()

Me.YourMemoFieldControl = Me.YourMemoFieldControl & vbCrLf

End Sub

(Replace YourMemoFieldControl with the correct control name)
 
Back
Top