SetFocus Method

Applies To   See Also

Assigns the focus to a control.

Syntax

Control.SetFocus

Remarks

You cannot assign the focus to a control if the control's Enabled or Visible property is set to false (.F.), or the control's When event returns false (.F.). If the Enabled or Visible property has been set to false (.F.), you must first set it to true (.T.) before the control can receive the focus from the SetFocus method.

Once a control has the focus, any user input is directed to that control.