Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Append String to Text Box, Re-append when updated

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> Microsoft Access
View previous topic :: View next topic  
Author Message
mistux
Site Admin


Joined: 25 Jun 2004
Posts: 1042
Location: South Bend, Indiana USA

PostPosted: Thu Apr 02, 2020 7:18 am    Post subject: Append String to Text Box, Re-append when updated Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> Microsoft Access All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group