Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Seattle, Washington, USA
    Thanked 0 Times in 0 Posts

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

    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:

    DoCmd "forms!frmAcceptance!housing"

    Anyone can help?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

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

    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.

Posting Permissions

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