stop navigation from subform to navigation form RRS feed

  • Question

  • Hi,

    I have an Access 2010 application.

    A navigation form with multiple parent and child tabs exist.

    There is a subform that are in the detail section of the navigation form.

    When a user is using the left arrow button on the first row of the subform datasheet to move from right to left on the first row, when they

    hit the first uneditable column (first 4 columns in datasheet are uneditable) the cursor they shift out of the subform and starts moving through the child and parent tab controls in the navigation pane.

    How do I stop this behavior, I would like it so that once a user is cursoring inside the datasheet subform , they can not hope up into the navigation tab controls without using the mouse.

    Is this possible?




    Friday, January 20, 2012 6:05 PM


  • How interesting, I never noticed this behavior.

    I think a easy way is in the key down event, simply disable the left arrow key in the left most column. This works for me:

    Private Sub ID_KeyDown(KeyCode As Integer, Shift As Integer)

       If KeyCode = vbKeyLeft Then
           KeyCode = 0
       End If

    End Sub

    I suppose you could also disable the shift tab, but I don't think users hit that key much to move to the previous column.

    Albert D. Kallal  (Access MVP)
    Edmonton, Alberta Canada


    • Marked as answer by Bruce Song Thursday, February 2, 2012 6:03 AM
    Saturday, January 21, 2012 2:54 PM