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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Help With SetFocus After Opening Form? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Author
    Topic
    #450075

    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

    DoCmd.OpenForm "frmMembers", , , , acFormAdd, acWindowNormal, Me.Name
    Forms!frmMembers.Form.strSalutation.SetFocus
    

    Thanks, John

    Viewing 1 reply thread
    Author
    Replies
    • #1105027

      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.

    • #1105067

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

    Viewing 1 reply thread
    Reply To: Help With SetFocus After Opening Form? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: