Memo Fields (1 Viewer)

legendv

Registered User.
Local time
Today, 02:43
Joined
Mar 18, 2002
Messages
99
I want to add info to a memo field without being able to change info that was already added, and with a date/time stamp. Is that possible?
 

WayneRyan

AWF VIP
Local time
Today, 02:43
Joined
Nov 19, 2002
Messages
7,122
legendv,

Me.Memo = Me.Memo & vbCrLf & strNewStuff & vbCrLf & Now()

will add it at the end

Me.Memo = Now() & vbCrLf & strNewStuff & vbCrLf & Me.Memo

will add it to the front.

hth,
Wayne
 

legendv

Registered User.
Local time
Today, 02:43
Joined
Mar 18, 2002
Messages
99
Wayne,

Bless you for years to come.

Do you know how to make previously entered data un-editable in the memo field....

Memo:
2/12/03 : Data Entered
2/13/03 : Entrys can be added but previously entered data can't
2/14/03 : new data, but cant edit above
 

Vassago

Former Staff Turned AWF Retiree
Local time
Yesterday, 21:43
Joined
Dec 26, 2002
Messages
4,751
Create another text box on the form for the user to enter in a memo, when they are done, have them click a button and post the code Wayne provided under that button. Then make the Memo field itself uneditable. This is what I did with one of my databases.
 

HaChIrish

Registered User.
Local time
Yesterday, 15:43
Joined
Oct 11, 2002
Messages
28
I'm not very good with vb. I got the button to work, but I can't get the memo to keep the old info. It keeps replacing memo with the new info. I used the code above as a on click event for the button. What do I need to do to fix this?

Also, how do I get rid of the 256 character limit on memo?
 

WayneRyan

AWF VIP
Local time
Today, 02:43
Joined
Nov 19, 2002
Messages
7,122
Hide your real memo field so that the users can't touch it.

Make a new memo field for them to enter data into. In the After
Update event for the new memo (NO control source) put:

Me.RealMemo = Me.RealMemo & Me.TempMemo

you can also change the order, put in Now(), etc...

Wayne
 

HaChIrish

Registered User.
Local time
Yesterday, 15:43
Joined
Oct 11, 2002
Messages
28
Thanks! Got it to work. Now about the 2nd part of the question: what kind of trick could I use to make my memo longer than 256 characters? I'm trying to create a event log for sales people who need to document who called in and the topics discussed.
 

WayneRyan

AWF VIP
Local time
Today, 02:43
Joined
Nov 19, 2002
Messages
7,122
HaChIrish,

The 255 is for TEXT fields, memos are considerably longer.

Wayne
 

HaChIrish

Registered User.
Local time
Yesterday, 15:43
Joined
Oct 11, 2002
Messages
28
That's what I tought, but for some reason, my memo field is being treated as a text field. Thanks though. I have no idea why. Data type says MEMO. Any ideas?

BTW: How do you add a space in vb? The code is:

Me.COMMENTS = Me.COMMENTS & vbCrLf & Now() & Me.NewComments & vbCrLf

It displays like this:

3/13/03 10:15:56 AMHERE'S WHERE MY NEW COMMENTS START.

I need to add a space, colon, whatever between AM and HERE.
Sorry if my questions seem so easy, I have no vb training.
 

Mile-O

Back once again...
Local time
Today, 02:43
Joined
Dec 10, 2002
Messages
11,316
To add a space you can use

& " " &

or

& Chr(32) &
 

Croco

Registered User.
Local time
Today, 11:13
Joined
Sep 16, 2009
Messages
18
WayneRyan, or whomever else, I am going to ask an even more fundamental question...Where do you actually put this piece of code that you gave legendv?

Me.Memo = Now() & vbCrLf & strNewStuff & vbCrLf & Me.Memo

Is it an event? I believe the effect will be exactly what I want but how to use it hasn't tumbled yet.
I see it as not unlike using .LOG at the top of Notepad - that stamps date and time every time it is opened and on a new line too.
Sorry for being so very naive!!!!

Croc
 

Users who are viewing this thread

Top Bottom