Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With SetFocus After Opening Form? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    I have the following code on a form command button.

    The form opens OK however I canít find the focus.

    How do I set the focus to strSalutation?

    frmMembers properties for Popup = Yes

    <pre>DoCmd.OpenForm "frmMembers", , , , acFormAdd, acWindowNormal, Me.Name
    Forms!frmMembers.Form.strSalutation.SetFocus
    </pre>


    Thanks, John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Help With SetFocus After Opening Form? (a2k (9.0.6926) SP-3 Jet 4.0 SP

    Does this work?

    Forms!frmMembers!strSalutation.SetFocus

    Is there a reason why you can't use the Tab Order of frmMembers to make strSalutation the first control in the tab order - you wouldn't need any code.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Help With SetFocus After Opening Form? (a2k (9.0.6926) SP-3 Jet 4.0 SP

    Note for others reading this: the discussion continued by accident in another thread, in <post:=705,334>post 705,334</post:>.

Posting Permissions

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