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

    How to Move Focus to Nexr Record? (a2k (9.0.3821) SR-1 Jet 4.0)

    How to Move Focus to Nexr Record?
    a2k (9.0.3821) SR-1 Jet 4.0

    I have a form with several Tab Controls that each display a sub form that display records in datasheet format.

    When I click on the Tab Control, how do I move the focus to the end of the listed records to the next available blank space so I can add a new record?

    Thanks, John

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

    Re: How to Move Focus to Nexr Record? (a2k (9.0.3821) SR-1 Jet 4.0)

    John, you write
    <hr>I have a form with several Tab Controls that each display a sub form<hr>
    I suppose that you mean that you have one tab control with several pages that each display a subform. You can use the On Change event of the tab control. Provided that the subform is the first control in the tab order on the page, you can use this:

    Private Sub tabControl_Change()
    DoCmd.GoToRecord Record:=acNewRec
    End Sub

    where tabControl is the name of the tab control.

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

    Re: How to Move Focus to Nexr Record? (a2k (9.0.3821) SR-1 Jet 4.0)

    perfect

Posting Permissions

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