• Moving to a field in Tab Control (Access 2K/SR1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Moving to a field in Tab Control (Access 2K/SR1)

    Author
    Topic
    #358681

    I have a form that opens a “subform” which floats above the main form. When I click on “close” on the floater, I want the cursor to automatically move to next Tab Page on my main form’s tab control. I keep on getting error messages saying that it cannot find the field I specify in my VB.

    I’ve tried these both:

    forms!frmEditAcceptance!housing.setfocus
    DoCmd “forms!frmAcceptance!housing”

    Anyone can help?

    Viewing 0 reply threads
    Author
    Replies
    • #535700

      First of all, if the “subform” floats above the main form and is called separately, it isn’t a subform, it’s a popup. Calling it a subform will cause confusion and get you answers that don’t apply. Subforms are *bound* to their parent forms through a subform control. Nothing else should be called a subform.

      With that out of the way, is the control you want to set focus to on the parent form or on a subform attached to the tab page? If it’s on the parent form, try selecting the parent form first using:

      DoCmd.SelectObject acForm, “frmEditAcceptance”,False

      Then try setting the focus to the control using the SetFocus method. However, if the tab page that is currently visible is *not* the one that contains that control, you’ll need to set the value of the Tab control to the index number of that page to make it visible.

    Viewing 0 reply threads
    Reply To: Moving to a field in Tab Control (Access 2K/SR1)

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

    Your information: