A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

insert date and time into memo field



 
 
Thread Tools Display Modes
  #1  
Old January 28th, 2010, 09:17 PM posted to microsoft.public.access.gettingstarted
mboren[_2_]
external usenet poster
 
Posts: 1
Default insert date and time into memo field

Using access 2003

Have a status form when staff enters their progress into a memo field

I need the user to be able to enter the date and time of his entry

The end result will be a short cut the will insure the infomation, I just
can't figure out the code for either a macro or a module that will do it.

  #2  
Old January 28th, 2010, 09:50 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default insert date and time into memo field

On Thu, 28 Jan 2010 21:17:33 GMT, "mboren" u57845@uwe wrote:

Using access 2003

Have a status form when staff enters their progress into a memo field

I need the user to be able to enter the date and time of his entry

The end result will be a short cut the will insure the infomation, I just
can't figure out the code for either a macro or a module that will do it.


If you're storing multiple dates and multiple progress steps in a single memo
field... you're sowing trouble for yourself. It will be very difficult or
impossible to search this big amorphous blob of text with some embedded dates.

I would strongly suggest that you instead create a Table related one-to-many
to this table (whatever it is); it should have a foreign key ID field for the
link, a NoteDate field with a default value of Now() to trap the time that an
entry is made, and a Text or Memo field into which the staff member will enter
their progress.

If you really want one big (essentially unsearchable) memo field you can use
some VBA code to enter the date and time; you'll need to tell us what form
event would be appropriate: do you want the field timestamped when the user
opens the form, or moves to a particular record, or sets focus to the notes
textbox, or clicks a button, or what?
--

John W. Vinson [MVP]
  #3  
Old January 29th, 2010, 02:10 PM posted to microsoft.public.access.gettingstarted
mboren via AccessMonster.com
external usenet poster
 
Posts: 1
Default insert date and time into memo field

Wow, thanks for the response; yeah, know about the lack of search capability,
but this is more like a diary which people enther there information to the
bottom of the field; brilliant people but people who can't seem to remember
to type in the date.

In my ideal world the user will enter a shortcut (ctrl y would be fine) and
wherever the curser is, the date (and username, i didn't mention that in the
first message) will be inserted. Hopefully they will insert it at the left
of a blank line and only use it once, but that will be there problem.

Would love to see what this looks like in VBA, its frustrated me.

thanks again

michael






John W. Vinson wrote:
Using access 2003

[quoted text clipped - 4 lines]
The end result will be a short cut the will insure the infomation, I just
can't figure out the code for either a macro or a module that will do it.


If you're storing multiple dates and multiple progress steps in a single memo
field... you're sowing trouble for yourself. It will be very difficult or
impossible to search this big amorphous blob of text with some embedded dates.

I would strongly suggest that you instead create a Table related one-to-many
to this table (whatever it is); it should have a foreign key ID field for the
link, a NoteDate field with a default value of Now() to trap the time that an
entry is made, and a Text or Memo field into which the staff member will enter
their progress.

If you really want one big (essentially unsearchable) memo field you can use
some VBA code to enter the date and time; you'll need to tell us what form
event would be appropriate: do you want the field timestamped when the user
opens the form, or moves to a particular record, or sets focus to the notes
textbox, or clicks a button, or what?


--
Message posted via http://www.accessmonster.com

  #4  
Old January 29th, 2010, 05:57 PM posted to microsoft.public.access.gettingstarted
Ron2006
external usenet poster
 
Posts: 936
Default insert date and time into memo field

What we have done to facilitate this type of logging is the following:

1) not allow direct logging into the memo field.
2) User double clicks on the field in order to update. When they do
this it opens a new form which shows the current content of the memo
field and another txtbox that they can enter new information into.
3) button on that form that says to add new comments to existing
information.
4) when button is pressed then construct the update to be
oldcomentfield = oldcommentfield & now() & " " &
newtoaddcommentsfield
OR
oldcommentfield = now() & " " & newtoaddcommentsfield & " " &
oldcommentfield
5) form also contains button to exit without any updating.

Ron
  #5  
Old January 29th, 2010, 11:28 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default insert date and time into memo field

On Fri, 29 Jan 2010 20:55:31 GMT, "mboren via AccessMonster.com" u57845@uwe
wrote:

works great, it is a work of sheer genius, putting code in a button and
adding a shortcut to it, amazing.
thank you all very much
i hope you realize you've adopted me


LOL!!!


--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.