Results 1 to 4 of 4

Thread: [RESOLVED] assigning focus

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    Resolved [RESOLVED] assigning focus

    this is probably a silly question but how do you assign focus to an object on the load of a form?

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: assigning focus

    You can't on load, try control.SetFocus on form activate instead.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: assigning focus

    Actually you can do it on load.. you just need to show the form (Me.Show) before issuing the Setfocus.

    An alternative is to change the TabIndex of the control(s) in design time.. the one with a TabIndex of 0 will be the one that automatically gets focus when the form loads.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    Re: [RESOLVED] assigning focus

    great, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width