Error Msg

  • Thread starter Thread starter orsonros
  • Start date Start date
O

orsonros

Hi!

I have some event procedure coded in the Save click command. I keep
getting a msg when I click the save button "You can't reference a
property or method for a control unless the control has the focus".
Can anyone explain what am I doing wrong!
Please help.

ORS
 
If you are referring to code in a command button's Click event, you will
need to post the code. If you are referring to something else, you will
need to clarify. More details are needed in any case.
 
Without seeing the code, I can't be 100% sure, but the most common cause of
this is using the Text property of the control while the control does not
have the focus.

Me.MyControl.Text

The Text property can only be used while the control has the focus. In any
case, it is not necessary. Just using Me.MyControl will return the current
value of the control. If this does not solve the problem, post back with the
offending code and we will have a look at it.
 
Back
Top