Textbox help

LB79

Registered User.
Local time
Today, 12:20
Joined
Oct 26, 2007
Messages
505
Hello,

Could someone please advise me on this problem.
I have a txtbox on a form that I want to change the name of (the VBA isn't in the same form).
I've tried the below options but none work – I've tried DefaultValue and ControlSource.

Thanks for any advice.


[Forms]![MyForm]![TextBox1].DefaultValue = "=MyText”
[Forms]![MyForm]![TextBox1].DefaultValue = "MyText”
[Forms]![MyForm]![TextBox1].DefaultValue = "’=MyText’”
 
If I understand you correctly you want to pass a value from one form to another. If so, you can use

Forms("OtherFormName")("OtherControlName").DefaultValue = "Fred"

This is called form the form that has the current focus. The Other form must also be open. You cannot pass anything to a closed form.
 
Hello,

Could someone please advise me on this problem.
I have a txtbox on a form that I want to change the name of (the VBA isn't in the same form).
I've tried the below options but none work – I've tried DefaultValue and ControlSource.

Thanks for any advice.


[Forms]![MyForm]![TextBox1].DefaultValue = "=MyText”
[Forms]![MyForm]![TextBox1].DefaultValue = "MyText”
[Forms]![MyForm]![TextBox1].DefaultValue = "’=MyText’”

you can try [Forms]![MyForm]![TextBox1].Value = "MyText”
 
[Forms]![MyForm]![TextBox1].Value = "MyText”
.value! Of course! How did I miss that!

Thanks for pointing out the obvious!
 

Users who are viewing this thread

Back
Top Bottom