Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically insert data into memo field

Status
Not open for further replies.

maccarone

Technical User
Jun 20, 2002
17
IT
I'm using Access 2000, and I need to insert, automatically, data and user name into a memo field.
In other words, each time that user modify text into memo field, I want add date and user name before the text modfication.

Eg.
This is the memo data:

First roiw
Second row
....
....
...
Lats row

At this point Mary add a new data into it. I want that memo field becomes:

First roiw
Second row
....
....
...
Lats row
************************************************
Data modified by Mary on November 11st 2004
************************************************
New row
new row
........

Could someone help me ???

Thanks
 
Hi

Assuming you are doing the Update via a form, put code in the after update event of teh control which is bound to the memo field

eg

MyMemo = MyMemo & Date() & " By " & UserId

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks,
but the problem, sorry but I've missed before, is that I want put data and user_id in a new line.
I tried:
Me.Descrizione_caso.SetFocus
Me.Descrizione_caso.Text = Me.Descrizione_caso.Text & vbCr & " Modifica del " & Now() & " --- Operatore: " & User.Operatore & "."

but in the memo field I have the following line preceded with square simbol (that I guess it represents the vbCr command.
How it is possible to insert a new line ??? With ASCII value ???

Thanks


Modifica del 31/12/2003 10.59.21 --- Operatore: Giuliani.
 
Try

Me.Descrizione_caso.Text = Me.Descrizione_caso.Text & vbCrLF & " Modifica del " & Now() & " --- Operatore: " & User.Operatore & "."



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top