Changing the source of a textbox

fluidmind

Registered User.
Local time
Tomorrow, 00:11
Joined
Jun 30, 2006
Messages
66
A simple question that would probably take me hours to figure out by myself: When I want to change the source of a listbox, fx. when a button is clicked, i use the command 'rowsource ='. But what command do i use to change the source of a textbox...??

Thank you in advance :-)

// JR
 
TextBoxes do not have sources, they are either unbound or bound to a field in an underlying query/table, the ControlSource for the control. Why would you want to change the "source" of a TextBox?
 
Hmmm....

Thanks so much for your quick reply.

I want to use it in this situation: I have two textboxes. When I open the form the second box is empty, but when i fill out the first textbox I want a standard-value to appear in box number two.

How is that done then???
 
You usually care of it in the AfterUpdate event of the first textbox.
Me.SecondTextBoxName = "Whatever you want"
 
... why didn't I think of that??

HAHAHA!!!

Yeah... You're absolutely right. Why didn't I think of that??? I'm quite new to this stuff. But you've probably allready figured...

Thanks so much!
 
Glad I could help. Depending on how you are using the second control (textbox) you may need to put some similar code in the Current event of the form.
 

Users who are viewing this thread

Back
Top Bottom