Default text in Text box on button click

stu_c

Registered User.
Local time
Today, 09:25
Joined
Sep 20, 2007
Messages
494
Hi all
I have buttons that when clicked provides default text into a text box, I know how to insert this into an empty the text box but how do I do this so it doesn't delete the text already in the text box but on a new line
 
on the click event:

Dim sText As String
sText = Me!Textbox1 & ""
If Len(sText) Then
sText = sText & vbcrlf & Replace$(Me.Textbox1.DefaultValue, """", "")
Else
sText = Replace$(Me.Textbox1.DefaultValue, """", "")
End If
Me!Textbox1 = sText
 
Last edited:
You concatenate the new data with whatever else you need, like vbCrlf
 
Why are you storing multiple pieces of information in one field?
 

Users who are viewing this thread

Back
Top Bottom