How to create a Date/Time Stamp in a memo field

pcdummy

Registered User.
Local time
Today, 10:43
Joined
May 9, 2001
Messages
45
I have an application that I would like to be able to create a commannd button on the form which would pouluate a memo field box with the current date and time. However, it must not disturb any of text that is already there. I am using this to keep a record of notes taken when speaking to a particular client. Anyone have any ideas???
Been looking forever.


Thanks
Jeff
 
If your memo field is called Memofield then this code in the On Click event of a command button should do what you want. Obviously change the name below to the actual name of your field...

Me.MemoField = Me.MemoField & Now()
 
Jack's code will work, but I'd add a space just to make it look right.

Me.MemoField = Me.MemoField & " " & Now()

Gotcha Jack,
RDH
 
Thanks guys worked beautifully. Love this site!!!! Will be here everyday from now on. Hope I can learn enough to help others as well.

My Sincerest Thanks

Jeff
 
I think you'll find it better if you store this date in a separate field (Date type), rather than tagged on the end of the memo text. You will then be able to use the numerous Date functions that Access offers.

You will also run into problems when you
want to search, sort etc on this date.
 
In a database I'm creating I want a field that shows the date and time a function was last used (in this case a backup being made). I've used this line of code in the On Click event of the command button and it updates an unbound field on my form called 'pubdate'. Only two problems:

- On pressing the button a second time the new date and time is just added on to the end of the first, I need the original to be cleared.
- On closing and re-opening the database, the date stamp has been lost altogether.

Is there a line I could add to clear the first date stamp before the updated one appears? Is there any way I can retain the information in that unbound field? There's no use adding this to a table because it applies to the whole database rather than individual records.
 
Forms don't store data. Tables store data. If you want to keep track of the last time something happened, create a table to hold the info and a bound form to update it.
 

Users who are viewing this thread

Back
Top Bottom