database_coder
New Member
- Joined
- Feb 6, 2014
- Messages
- 35
Hi all, I have a form that has three fields (1. Comments (TEXT), 2. Legacy_Comments (TEXT), 3, Comment date (DATE))
Now my users need to keep adding comments to the comment text box, and when they do it automatically adds the date they entered the comment in the Comment date box. Now my problem is that since they keep adding comments to the comment box, I need to keep track of these comments in the Legacy_Comments (Text box).
For example, the First time a user enters a comment into the (1) comment text box it auto populates the date in the comment date box, and then adds the comment and date to the Legacy_Comment box. the end result is (comment,4/3/2014
now lets say a user needs to add a comment to the comments box tomorrow I want the legacy_Comment box to then read (comment, 4/3/2014; comment2, 4/4/2014, ...., comment
,date
How can I write a VBA code that will always add the new comment to the legacy_comment field, without deleting the comments that were entered previously?
so far I have tried
But this does not keep adding the comments that were adding in yesterday to the comments that were adding in today. Could anyone help me solve this problem? Or, has anyone else encountered this problem? If so, how did you get around to solving it?
Now my users need to keep adding comments to the comment text box, and when they do it automatically adds the date they entered the comment in the Comment date box. Now my problem is that since they keep adding comments to the comment box, I need to keep track of these comments in the Legacy_Comments (Text box).
For example, the First time a user enters a comment into the (1) comment text box it auto populates the date in the comment date box, and then adds the comment and date to the Legacy_Comment box. the end result is (comment,4/3/2014




so far I have tried
Code:
If isnull(me.comment.value) Then
Exit Sub
Elseif me.comment.value = true then
me.comment_date.value = date
me.legacy_comment.value = me.comment.value & "," & me.comment_date.value & ";"
me.legacy_comment.value = me.legacy_comment.value & "," & me.comment_date.value = date & ";"
But this does not keep adding the comments that were adding in yesterday to the comments that were adding in today. Could anyone help me solve this problem? Or, has anyone else encountered this problem? If so, how did you get around to solving it?