Date/Time stamp in Memo Field

P

Peter

Hi all..is it possible to programmatically insert Now() when text in a Memo
field becomes edited?

Thanks for all help!
 
J

Jeff Boyce

Peter

Is this because you are entering a single bit of text and want a date/time
stamp, or are you trying to stuff multiple notes into one Memo field, each
one date/time stamped?

(hint: if the latter, look into using a Notes table instead...)

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
P

Peter

Thank you so much Ling and Jeff..this is very usefull. Yes i enter new notes
each time i edit the record resulting in a long string of notes in one memo
field. I am also using the FoSUsername module in the main record..i suppose i
can use it inthe memo field as well..?

Once again..thanks a lot!
 
J

Jeff Boyce

Peter

Memo fields carry their own special needs...

If you need/want a set of notes, date/time stamped, consider creating a
notes table with NoteDate and Note fields (and I would add NoteBy to capture
the person leaving the note).

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

James Brazelton

Sorry, I know I'm resurrecting an old thread, but I tried to use the
code you mention and I had some problems with it. When I use:

Private Sub MemoFieldName_AfterUpdate()
If IsNull(Me.MemoFieldName.OldValue) Then
Me.MemoFieldName = Now & " " & Me.MemoFieldName
Else
Me.MemoFieldName = Left(Me.MemoFieldName, Len
(Me.MemoFieldName.OldValue)) &
" " & Now & " " & Right(Me.MemoFieldName, Len(Me.MemoFieldName) - Len
(Me.
MemoFieldName.OldValue))
End If
Me.Dirty = False
End Sub

The problem I have is as you mention: If I want to edit the memo field
after I've entered something, I have to close the form and then reopen
it. Otherwise, when I try to edit it, I get an error. Is there any way
around this?
 

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