Textbox string value used in another textbox's control source

mergle

Registered User.
Local time
Today, 08:59
Joined
Jan 31, 2003
Messages
54
I am wanting to store an expression as a string value in a bound textbox (example: "=1/(4*8)"), and then use it as a control source in another textbox.

Would this have to be done as a VBA function?
 
You could set the other text box's control source to:

=Eval([YourTextBoxNameHere])

leaving the square brackets around it.

Then you can enter this:

1/(4*8)

and it will evaluate it.
 
That's exactly what I needed...

Thank you.
 
Hi Bob - what if the textbox with the source data is located in a sub form in the main form. I keep getting a #name error?
 

Users who are viewing this thread

Back
Top Bottom