Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Exit continuous view subform

Discussion in 'Information Technology' started by Ricter, Jul 28, 2006.

  1. Ricter

    Ricter
    Expand Collapse
    Guest

    I'd like to know if there is a current preferred practice for making movement
    between continuous view subforms behave the same as it does for moving
    between datasheet view subforms, ie. when in the last field of the subform
    the user pressing Tab or Enter moves the focus to the next control in the tab
    order.

    I've googled the problem and found, imho, a rather convoluted solution.
    Thought I'd check for something simpler in later Access versions.

    tia
     
  2. Loading...

    Similar Threads Forum Date
    World An Exit Plan for Mubarak Breaking News Feb 4, 2011
    SciTech Tools Suggest Earlier Human Exit From Africa Breaking News Jan 30, 2011
    Two opposite news: One depressing & another exiting Community Out-Reach Oct 26, 2009
    Sikh News President be made accountable instead giving safe exit: Punjab CM (The Pakistan Link) Breaking News Aug 17, 2008
    Sikh News Capt's shrine visit raises storm, BJP-Akalis demand his exit (Outlook India) Breaking News Jun 22, 2005

  3. Ricter

    Ricter
    Expand Collapse
    Guest

    I cannot get out of the subform without using Ctl + Tab. Even using the
    following code, I remain "stuck" in the first subform:

    Private Sub Value_Exit(Cancel As Integer)

    Forms![frmShipments]![subInvoices].Form![VendorInvNum].SetFocus

    End Sub

    That's Microsoft's syntax. And I've used the examples from the Access Web
    "How to refer to controls and properties", etc. I don't understand the
    problem here.

    Mainform: frmShipments
    sub1: subTariffs
    sub2: subInvoices
    Last field in subTariffs: Value
    First field in subInvoices: VendorInvNum




    "Ricter" wrote:

    > I'd like to know if there is a current preferred practice for making movement
    > between continuous view subforms behave the same as it does for moving
    > between datasheet view subforms, ie. when in the last field of the subform
    > the user pressing Tab or Enter moves the focus to the next control in the tab
    > order.
    >
    > I've googled the problem and found, imho, a rather convoluted solution.
    > Thought I'd check for something simpler in later Access versions.
    >
    > tia
    >
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Fri, 16 Jun 2006 08:01:02 -0700, Ricter
    <Ricter@discussions.microsoft.com> wrote:

    >I cannot get out of the subform without using Ctl + Tab. Even using the
    >following code, I remain "stuck" in the first subform:
    >
    >Private Sub Value_Exit(Cancel As Integer)
    >
    >Forms![frmShipments]![subInvoices].Form![VendorInvNum].SetFocus


    In my experience you need TWO setfocus events: first setfocus to the
    other subform, and only after that setfocus to a control in that form:

    Forms![frmShipments]![subInvoices].SetFocus
    Forms![frmShipments]![subInvoices].Form![VendorInvNum].SetFocus

    or if frmShipments is the parent form, just use

    Parent!subInvoices.SetFocus
    Parent![subInvoices].Form![VendorInvNum].SetFocus

    John W. Vinson[MVP]
     
  5. Ricter

    Ricter
    Expand Collapse
    Guest

    Bingo! Thanks John.

    And now I can go back and try to solve an old problem, moving from a subform
    on a tab control to a subform on another tab. I have a feeling that two set
    focus events might just solve it.



    "John Vinson" wrote:

    > On Fri, 16 Jun 2006 08:01:02 -0700, Ricter
    > <Ricter@discussions.microsoft.com> wrote:
    >
    > >I cannot get out of the subform without using Ctl + Tab. Even using the
    > >following code, I remain "stuck" in the first subform:
    > >
    > >Private Sub Value_Exit(Cancel As Integer)
    > >
    > >Forms![frmShipments]![subInvoices].Form![VendorInvNum].SetFocus

    >
    > In my experience you need TWO setfocus events: first setfocus to the
    > other subform, and only after that setfocus to a control in that form:
    >
    > Forms![frmShipments]![subInvoices].SetFocus
    > Forms![frmShipments]![subInvoices].Form![VendorInvNum].SetFocus
    >
    > or if frmShipments is the parent form, just use
    >
    > Parent!subInvoices.SetFocus
    > Parent![subInvoices].Form![VendorInvNum].SetFocus
    >
    > John W. Vinson[MVP]
    >
     
  6. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Mon, 19 Jun 2006 06:53:02 -0700, Ricter
    <Ricter@discussions.microsoft.com> wrote:

    >Bingo! Thanks John.
    >
    >And now I can go back and try to solve an old problem, moving from a subform
    >on a tab control to a subform on another tab. I have a feeling that two set
    >focus events might just solve it.


    They should. Note that the tab control plays NO role - you simply set
    focus to the subform then the control on the subform, you don't need
    to reference the tab page or the tab control at all (the right page
    will open).

    John W. Vinson[MVP]
     

Share This Page