setting and resetting focus...

  • Thread starter Thread starter Trevor Hargrove
  • Start date Start date
T

Trevor Hargrove

I have a form with a text box in the form header section.
I want the cursor to be in this box when the form is
opened. However, the focus automatically goes to the
detail section. Can I change this?

Also, after the user types in a number and hits enter, the
form does its work but I want the text box to clear and
have the focus reset there. Is this possible?

Any help is greatly appreciated. Thanks.
 
Trevor,
Add Me.YourControlName.SetFocus in the Form_Load event.

To clear the control use Me.YourControlName = Null

----- Trevor Hargrove wrote: -----

I have a form with a text box in the form header section.
I want the cursor to be in this box when the form is
opened. However, the focus automatically goes to the
detail section. Can I change this?

Also, after the user types in a number and hits enter, the
form does its work but I want the text box to clear and
have the focus reset there. Is this possible?

Any help is greatly appreciated. Thanks.
 
Back
Top