Access 2003 Memo Fields

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
 
J

Jim Burke in Novi

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
 
D

Douglas J. Steele

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)
 
L

Linq Adams via AccessMonster.com

I've used Memo fields successfully for a number of years by following one
simple rule: never, ever put any data into a Memo field that you will ever,
in your wildest dreams, need to manipulate! That's means if there's any
possibility, whatsoever, that you will need to search, sort, tally, parse or
in any way use the data for anything other than printing it, in toto, don't
place it in a Memo field, but follow Doug's advice.
 

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

Top