Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2001
    Location
    Christchurch, New Zealand
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Move from Subform to Mainform using tab (XP/W2K)

    Hi,

    I have been searching for a solution to allow me to move from the last field on a subform back to the mainform, I have been working with:

    If StrComp(Me.Bookmark, rs.Bookmark, 0) = 0 Then
    Forms![frmPosition]![PositionStatusID].SetFocus
    End If

    Problem is that this only allow me to move from the last record... I want to be able to move from the new record line. This allows the user the option to add a new record in the form first before setting the focus back to the mainform.

    Many Thanks
    Tony

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

    Re: Move from Subform to Mainform using tab (XP/W2K)

    If I understand you correctly, you can throw away the RecordsetClone and Bookmark stuff, and use this:

    Private Sub MyControl_Exit(Cancel As Integer)
    If Me.NewRecord Then
    Forms![frmPosition]![PositionStatusID].SetFocus
    End If
    End Sub

  3. #3
    Star Lounger
    Join Date
    Jun 2001
    Location
    Christchurch, New Zealand
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Move from Subform to Mainform using tab (XP/W2K)

    It has been thrown... exactly what I needed to do.

    Many Thanks Hans

    Cheers
    Tony

Posting Permissions

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