I am having problems setting the property text of a text box.
When I set the property for the first time, no problem. But then when I change the property in the same function, same line of code, it gives me an error: "2135 this property is read only and can't be set"
I think this problem is common for a lot of people.
Can you show us the line of code that you are using to set the property. probably the whole function will help!
Of course! Here you have:
Me.ArrivalDay.Text = Day(ListItem.Subitems(2))
Some explanations more: when I load the form, I call this function to fill text boxes from a controlListView. This works well, but then I call again the function when you click in the listbox and another item is highlighted, then the error appears
.TEXT works fine as long as the control has focus. If you have to assign the value to the text box anywhere else in the code, never use the .text property. Hope it helps !
Yes! it helps. But I wanted to changed the .text property cause I want to use the onChange event. This event occurs when the text property has changed. And sometimes it happens without give the focus to the text box (by means of a calendar).
That's why I wanted to use this property.