I am running below code in my Access 2016 to keep history of Comments.
Where AddNewComment is an Unbound TextBox & Comments is a TextBox field which is not "Enabled". So once user enter text in AddNewComment and click Save Comment Button it update the Comments box with Date & TimeStamp.
Issue is even if i will have more than one comment i can only see first comment in the table; can't view other comments in table.
Field Name is "Comments" data type is "Long Text".
**Code**
Private Sub Save_Comment_Click()
If (IsNull(AddNewComment.Value)) Then
MsgBox ("Please Enter a Comment before clicking" & _
"on the Save Comment buttonn.")
Exit Sub
End If
If (IsNull(Comments.Value)) Then
Comments.Value = AddNewComment.Value & " ~ " & _
VBA.DateTime.Date & " ~ " & VBA.DateTime.Time
Else
Comments.Value = Comments.Value & _
vbNewLine & vbNewLine & _
AddNewComment.Value & " ~ " & _
VBA.DateTime.Date & " ~ " & VBA.DateTime.Time
End If
AddNewComment.Value = ""
End Sub
vbCrLf
. Are you sure the revised string is not in table? Did you make the row height taller? Recommend a related table and each comment is a new record. – June7