Run-time error 2185

  • Thread starter Thread starter Craig
  • Start date Start date
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?
 
Hi,
When you use the Text property, the control must_have_the_focus.
So, just use:
Code is: Text2 = Val(Text1) * .05
 
Back
Top