Insert Date at beginning of text field (1 Viewer)

maacky99

Access Newbie
Local time
Today, 00:11
Joined
Jun 3, 2004
Messages
35
I have a text field called Notes - where we will add notes about the particular job. What I want to do is have it a locked field with a button 'Add Notes'. When clicked it will insert the date and the user name of the person and then let them type the notes. When they move to the next record - I want that field to be locked again.

I've got some of it down but still not right. I can get it so it inserts the date but it overwrites what is already there. How can I get it to just add the data - not overwrite? And I can't get it to lock when they move to the next record.

Any help would be appreciated.

Thanks,

Jason
 

maacky99

Access Newbie
Local time
Today, 00:11
Joined
Jun 3, 2004
Messages
35
I don't want to be a nag an bump up my own question - but I'm getting hammered to get this done this morning and I haven't figured out a solution yet.

Anyone have any ideas or experience with this?

Thanks again,

J
 

Rod D

Registered User.
Local time
Yesterday, 21:11
Joined
Feb 9, 2006
Messages
87
Jason - As you seem to be under some pressure - some ideas.

I assume that the field is on a form, linked to a table and therefore the "edit" of the field has to be done via VB as part of the button "click" script.

To stop the over-writing problem, use the "&" to append the date to the text in the field. You can use chr(13) if you want to add it on a new line. So as part of the "click" script add...

me![Notes] = me![Notes] & chr(13) & Date() & chr(13)
Forms![[formname]![Notes].Locked = False

...and for the locking...
in the On Exit event, put in the code...
Forms![[formname]![Notes].Locked = True


Hope this gets you going...
Regards
Rod
 
Last edited:

maacky99

Access Newbie
Local time
Today, 00:11
Joined
Jun 3, 2004
Messages
35
Rod - thanks for the quick reply. I am trying that right now - I can see what you are doing and it looks like it will work.

Thanks.
 

Users who are viewing this thread

Top Bottom