Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textbox properties in code 1

Status
Not open for further replies.

martiros

Technical User
Feb 1, 2003
113
0
0
US
How can I change text in the textbox in code?
For label I can use label.caption but what can be used for textboxes? I haven't found anything like .text or .value for textbox....

Thank you

 
Use either:

YourTextBox = "what you want there"

or

YourTextBox.Value = "what you want there"

Good luck...
 
I've tried both ways and it gives me a runtime error #2448:
"You can't assign a value to this object"

What is wrong with my Access?
 
If the text box is bound, you can't change the value. Where is your code? What is your code? What is the control source of the text box? What section contains the text box?

Duane
 
I'm having a similar problem on a report. The code is in the On Open event. It's merely pulling the numbers from one of many recordsets i'm using and trying (and failing) to assign them to a textbox. It is unbound. The code works fine on a form but not a report. Why?

royhouser
[hourglass]
More is lost by Indecision than Wrong Decisions
 
You should attempt to assign a value to an unbound text box during the On Format event of the section containing the text box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top