Run-time error 2185

C

Craig

I am doing a form with 2 unbound text boxes, and a
command button. I want to enter a value in the first text
box and have it calculate a value for the second text box.
Code is: Text2.Text = Val(Text1.Text) * .05
I am getting this error message:
You can't reference a property or method for a control
unless the control has the focus. What does this mean?
What am I missing?
 
D

Dan Artuso

Hi,
When you use the Text property, the control must_have_the_focus.
So, just use:
Code is: Text2 = Val(Text1) * .05
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top