mistux Site Admin
![](images/avatars/gallery/Miscellaneous/pc_user.gif)
Joined: 25 Jun 2004 Posts: 1042 Location: South Bend, Indiana USA
|
Posted: Thu Apr 02, 2020 7:18 am Post subject: Append String to Text Box, Re-append when updated |
|
|
Updating the value held by a form control as part of the event handler for the AfterUpdate event. Do this with Me!IncidentDescriptionInput.Value = Output
Retrieving the existing value of a form control for concatenation with another string. Do this with Output = Me!IncidentDescriptionInput.Value
Concatenating the existing value of a form control with another string. You do this with Output = Output & " " & Format(Now(), "dd-mmm-yy") ...
Assuming that the summary box is called IncidentDescriptionSummary, then the code might be modified to something like:
Code: | Private Sub IncidentDescriptionInput_AfterUpdate()
Dim Output As String
Output = IncidentDescriptionInput & " " & Format(Now(), "dd-mmm-yy\/hh:nn\/") & Environ("UserName") & ";"
IncidentDescriptionInput = Output
IncidentDescriptionSummary = IncidentDescriptionSummary & vbCrLf & Output
End Sub |
|
|