Results 1 to 6 of 6
  1. #1
    mikem is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2021
    Posts
    19

    tab between subforms

    I have a form that has multiple subforms on it.
    The image below shows 4 subforms.


    Is there a way to automate so that when it gets to the last record of the top subform, tab takes me to the first record of the next subform, instead of having to use ctrl-tab?

    Click image for larger version. 

Name:	subforms.jpg 
Views:	16 
Size:	163.0 KB 
ID:	44774

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mikem is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2021
    Posts
    19
    each subform is bound to a different query

    I got it to go to the next subform with the code below, and it tabs down that subform until the last record then goes to the next subfor.

    But now need to go to the first record and select it. There is only one active field.

    I think I'm supposed to use MoveFirst, but can't figure out how to use it in my example below


    Private Sub Score_Exit(Cancel As Integer)


    If (Me.Recordset.AbsolutePosition = Me.Recordset.RecordCount - 1) Then
    Parent.frmShortScoresC.SetFocus


    'how do I select the first record?
    Recordset.MoveFirst


    End If


    End Sub

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Try DoCmd.GoToRecord,,acGoTo, acFirst
    Should work if the subform is the active object. If not, you'll have to specify the object type and its name:

    https://docs.microsoft.com/en-us/off...cmd.gotorecord
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    mikem is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2021
    Posts
    19
    that was it

    thank you

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    U R welcome!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-31-2020, 05:02 PM
  2. Replies: 11
    Last Post: 05-13-2015, 11:10 PM
  3. Subforms Inside Subforms
    By LordPanzer in forum Access
    Replies: 1
    Last Post: 10-11-2013, 05:19 PM
  4. subforms
    By thewabit in forum Forms
    Replies: 6
    Last Post: 02-01-2010, 09:03 PM
  5. Help with subforms
    By chocpoc in forum Forms
    Replies: 0
    Last Post: 05-20-2009, 11:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums