add date information automatically to memo (1 Viewer)

L

lexington

Guest
Hi, new kid on the block needs some help.

I have created a form that has a memo portion which is updated periodically with new information (user types in updates). I would like to arrange for an automatic date entry to be added at the start of each new data entry session so I have an automatic history of when the updated entries were made.

There are other 'process' ways around this -i.e. popup calender that stays until date is selected but if I could do something more transparent it would be better.

This is beyond my skill level at present - any thoughts or help much apreicated. Thanks in advance.
 
Local time
Today, 04:59
Joined
Aug 2, 2004
Messages
6
Try the following code. Insert it into the Memo fields AfterUpdate event. Also if your working on a network you can take this a little farther by adding the User Name of the person logged onto the computer to your time stamp. I have inserted this into the code as well. If it isn't what you want simply delete it from the code. Hope this helps. :cool:

Private Sub Memo_AfterUpdate()
Dim Memo As String
Dim RevisedMemo As String
Dim TimeStamp As String
Dim User As String
Dim Test As Varient

Test = txtMemo.Value
If IsNull(Test) Then
MsgBox "Enter some Comments!"
Else:
Memo = txtMemo.Value
TimeStamp = Now()
User = Environ("UserName")
RevisedMemo = TimeStamp + User + Memo
txtMemo.Value = RevisedMemo
End If

End Sub
 

Users who are viewing this thread

Top Bottom