We help IT Professionals succeed at work.

Editing a TextBox

LucyTaylor
LucyTaylor asked
on
Hello, I have a textbox that displays certain data when certain checkboxes are checked, what i need to know is how do i edit the data in the textbox.  For example if the textbox reads 'Thereare two numbers"  how would i be able to edit the display to add a space between there and are.  Thanks
Comment
Watch Question

Commented:
try something like this

Private Sub Command1_Click()
Dim str
str = "Thereare two numbers"
Mid(str, 6) = " " & Mid(str, 6)
Debug.Print str
End Sub

replace str with Textbox name


Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
or

Dim str
str = Replace$("Thereare two numbers","Thereare","There are")
Debug.Print str

?

Author

Commented:
I am sorry, i might have confused you on the question, i just need to be able to edit the data in the text box, when the data is displayed on the userform i need to be able to click on the textbox to make changes.
Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
How do you display your data? Link/ Bound to a Data Control? Is it a Query from many tables or just from single table?

Author

Commented:
Linked
Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
So, back to your problem.

Are you mean you can't change the value (Text) in the TextBox Bound to a DataSource?

Author

Commented:
Yea
Software Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT
Commented:
Not Locked = True in the TextBox, i guess.

Are you join the tables to get the records to display? Some of the query cannot be updated when joining together.

Author

Commented:
The Locked property was set to to true, thanks
Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
You're welcome :)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.