none
Problen with TAB control i Access2010 - will not react on short cuts ?? RRS feed

  • Question

  • I have made a form in Access 2010 where I use the TAB control.

    Now I've finished the application I can experience that the TABs DON'T shift when using the short cuts I've given them !

    It look like the shortcut is catched by the menus in Access itself.

    People say there is a "problem" with the TAB control in version 2010.

    Is there a fix avaiable for that (I don't want to buy a newer version of Access/Office ;-)) )  ?

    Sunday, June 4, 2017 3:55 AM

Answers

  • Hi Ksor2,

    I try to create a Tab control with some textbox inside it and one textbox on the form outside tab control.

    then I set the shortcut keys on that with the use of '&' sign.

    you had mentioned that when you press the shortcut key you got the box on the top. when I run this form. I also get that.

    it looks like Access already has some shortcut keys and it is waiting for us to press that key. so it just informing us to continue typing the key.

    also I find that the shortcut keys are not working that are created for the textboxes on my side.

    but I find the work around that might work for you.

    I try to use Form_KeyDown event.

    on this event I try to check the which key pressed.

    and if some certain key get pressed then I try to active that page in tab control.

    so it is working like shortcut key.

    you can set key what ever you like and when you press it, it will activate that tab.

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
     If KeyCode = 65 Then
            Me.TabCtl0 = 0
        End If
        
         If KeyCode = 66 Then
            Me.TabCtl0 = 1
        End If
        
         If KeyCode = 67 Then
            Me.TabCtl0 = 2
        End If
        
         If KeyCode = 68 Then
            Me.TabCtl0 = 3
        End If
        
         If KeyCode = 69 Then
            Me.TabCtl0 = 4
        End If
    End Sub

    Output:

    Note that I am not pressing the shortcut key that is assigned with the '&' sign in the name. I am pressing the key that I am checking in the code i.e. 'a','b','c','d','e'.

    you refer link below to get key code.

    Key Code Constants

    I think this work around can solve your issue.

    other thing you had asked that how to post video in the suggestion.

    you need to first capture your screen then you can try to convert it to .GIF format and post it as an image.

    you can also use the software that allow you to capture screen directly in GIF format.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Wednesday, June 7, 2017 8:50 AM
    Moderator

All replies

  • Hi Ksor2,

    I want to confirm with you that can you inform us how you try to add the shortcut to the Tab control?

    by using code or setting some property from tab control?

    let me know about that so that I can make a test on my side and let you know about the result.

    when I try to check the Tab control on my side I find that tab control or it's page does not have any property to set short cut key to open particular Tab.

    I also test the  Ctrl+F6 and Ctrl+Shift+F6 , but it also did not work.

    then I try to use left arrow key and right arrow key to shift tabs and it works for me.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 5, 2017 2:50 AM
    Moderator
  • Hi - thx for your time !

    I name each single TAB with an ampersan in front of the latter I want to be the shortcut - some samples: &Pictures, Ko&mmentar.

    And the spooky thing is that it work SOMETIMES - sometimes I manages to get the focus to one of the TABs and THEN your method (arrows left and right) works - I normally use Ctrl+TAB-key and back by adding SHIFT.

    I have tried the property Keypreview with no success.

    I'm so sick and tired of HAVING to move between the keyboard and the mouse so I want to find THE METHOD to manage it all by the keyboard !

    - but I think the focus gets "trapped" on the TABs, somewhere outside the TABs or inside a field and the only way to move it is the click with the mouse ... and it's SOOOOOO annoying !

    Monday, June 5, 2017 5:50 AM
  • Hi Ksor2,

    you had mentioned that,"I name each single TAB with an ampersan in front of the latter I want to be the shortcut - some samples: &Pictures, Ko&mmentar."

    here I want to inform you that it will not create any shortcut for that tab. so it will not work when you try to press short cut key.

    then you had mentioned that you had try to set property 'Keypreview'. I did not find any property like this.

    can you show me a picture of that property so I can check that property.

    I try to check the Tab controls property again and I find that it does not provide any property that set  shortcut key for tab.

    you can try to check it.

    TabControl Members (Access)

    so its looks like you have to use Ctrl + Tab or arrow keys to change the tabs.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 6, 2017 7:27 AM
    Moderator
  • here I want to inform you that it will not create any shortcut for that tab. so it will not work when you try to press short cut key.

    then you had mentioned that you had try to set property 'Keypreview'. I did not find any property like this.


    Ha, ha, I think you're wrong here because IF THE FOCUS is on the tabs then I can shift nicely by using these underscored letters - unfortunately the focus moves to the first control on the new tab and then it's trapped there. If you want to shift to another tab you have to bring focus UP to the tabs again - very annoying !

    The property "Keypreview" if on the FORM - maybe I translate it wrong from my DANISH version - it's the last property on the Event tab.

    It's a total mess to try to ONLY use keyboard - I think that's a very big step backwards ;-((

    Tuesday, June 6, 2017 8:25 AM
  • Hi Ksor2,

    I misunderstand in your last post. I thought you are trying to that shortcut key on 'keypreview' on Tab's property.

    I can move with '&' sign.

    but you had mentioned that when focus on control of the tab then your shortcut is not working.

    see I make a test on my side.

    you can see that focus is on control on first tab. but then also I can move through tabs.

    you can also check that I also put the same shortcut key on that button as tab1. then also it did not stuck there.

    please confirm that I am reproducing the issue same as you. if you find any difference then let me inform about that. I will again try to make a test.

    Regards

    Deepak 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 6, 2017 8:51 AM
    Moderator
  • Wav - that's what I'm after - I can NOT AT ALL do what you do there !

    (PS: And give me a link to learn how to insert such "live" pictures as you did here ;-))


    • Edited by Ksor2 Tuesday, June 6, 2017 8:59 AM
    Tuesday, June 6, 2017 8:58 AM
  • I now made a simple form with some few textboxes and a TAB-control with some textboxes on each TAB.

    Each textbox and each TAB is provided with an underscored letter.

    When I start this form from design-view to form-view, the focus (the curser is blinking) in one of the textboxes on one of the tabs.

    I now want to move the focus to the textbox on the FORM outside that TAB'control - when usign ALT+T (the underscored letter) the Access menu opens and show me a sign with some crab text on older versions of access and a lot of small squares with letters in them - I think it looks lilke these letters are the shortcuts to all the items in the menu !!!!!!!!!

    ... I just want to move focus to my textbox on the form !!!!!!!!!

    Do I have some stupid setting that turns this on or what ... ????

    Tuesday, June 6, 2017 10:03 AM
  • Hi Ksor2,

    I try to create a Tab control with some textbox inside it and one textbox on the form outside tab control.

    then I set the shortcut keys on that with the use of '&' sign.

    you had mentioned that when you press the shortcut key you got the box on the top. when I run this form. I also get that.

    it looks like Access already has some shortcut keys and it is waiting for us to press that key. so it just informing us to continue typing the key.

    also I find that the shortcut keys are not working that are created for the textboxes on my side.

    but I find the work around that might work for you.

    I try to use Form_KeyDown event.

    on this event I try to check the which key pressed.

    and if some certain key get pressed then I try to active that page in tab control.

    so it is working like shortcut key.

    you can set key what ever you like and when you press it, it will activate that tab.

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
     If KeyCode = 65 Then
            Me.TabCtl0 = 0
        End If
        
         If KeyCode = 66 Then
            Me.TabCtl0 = 1
        End If
        
         If KeyCode = 67 Then
            Me.TabCtl0 = 2
        End If
        
         If KeyCode = 68 Then
            Me.TabCtl0 = 3
        End If
        
         If KeyCode = 69 Then
            Me.TabCtl0 = 4
        End If
    End Sub

    Output:

    Note that I am not pressing the shortcut key that is assigned with the '&' sign in the name. I am pressing the key that I am checking in the code i.e. 'a','b','c','d','e'.

    you refer link below to get key code.

    Key Code Constants

    I think this work around can solve your issue.

    other thing you had asked that how to post video in the suggestion.

    you need to first capture your screen then you can try to convert it to .GIF format and post it as an image.

    you can also use the software that allow you to capture screen directly in GIF format.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Wednesday, June 7, 2017 8:50 AM
    Moderator
  • OK, then we're back to what started this thread:

    1) there IS in fact a problem with the TAB-control

    2) there is NO official fix to the 2010-office version released by Microsoft

    and you found a work-around solution - thx - I'll try to see if the more-coding is worth the benefits of the work.

    EDIT: I'm afraid not ... if there are more controls with the same shortcut - and I think that's mostly the case - it would be a mess to manage !

    MS should make a fix to this fatal error in the TAB control  !!!!!!!!!!!

    • Edited by Ksor2 Wednesday, June 7, 2017 10:48 AM
    Wednesday, June 7, 2017 9:08 AM
  • Hi Ksor2,

    you had mentioned that ,"

    EDIT: I'm afraid not ... if there are more controls with the same shortcut - and I think that's mostly the case - it would be a mess to manage !

    MS should make a fix to this fatal error in the TAB control  !!!!!!!!!!!

    "

    I think that you just need to set one single key for short cut as I done in my example. generally the default short cut keys have combination of keys. so if you set a single key then it would not create any conflict between shortcut key.

    if you think that this issue need to be solved then please provide your feedback to user voice regarding this issue.

    Welcome to Access Suggestion Box!

    Access Developers will try to test the issue on their side and try to fix it.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 8, 2017 1:15 AM
    Moderator
  • Your argument doesn't hold - take a look at various dialog boxes in various programs - they have lots of underscored letters used 2 or 3 times - so your proposal is just a tedious workaround with too much work in it.

    But thx for your time and the link - I will try that.

    Thursday, June 8, 2017 3:54 AM