Results 1 to 7 of 7
  1. #1
    Rokkit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    4

    Supress onscreen "Num Lock" display

    I use
    Code:
    SendKeys "{tab}"
    a few times within my program. Whenever SendKeys executes, it sends the current status of Num Lock on the screen. It doesn't change from Num Lock on or off, it just displays the status.



    I can turn off this function from the control panel, but it will turn off Caps Lock and Num Lock permanently, which I'd prefer not to do.

    It doesn't affect the operation of the program, but it's annoying to see the Caps Lock indicator flash on screen.

    Can this be disabled via VBA?

    TIA

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    SendKeys is one of those commands that does not always work as expected. Why are you sending a tab? What do you expect to happen? Maybe there is another way to achieve the same results without using SendKeys.

  3. #3
    Rokkit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    4
    I use it for when opening a form and dropping down a list. When he form loads:

    Code:
    Private Sub Form_Load()
    Me.Check272.SetFocus
    SendKeys "{tab}"
    End Sub
    which tabs over to a combo box

    Code:
    Private Sub Find_a_Customer_GotFocus()
    Me![Find a Customer].Dropdown
    End Sub

  4. #4
    Peter M is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2017
    Posts
    67
    Why aren't you using Me![Find a customer].setFocus ?

  5. #5
    Rokkit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    4
    Because the combo box will not drop down (I just verified that - again). The only way I can get the box to drop down on page loads is to tab over from another field.

  6. #6
    Peter M is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2017
    Posts
    67
    Try
    Me![Find a customer].setFocus

    And then under the Event Action Got Focus:
    Me![Find a customer].DropDown

    This should cause the Combo Box to open when it has focus. (If you want the combo box to just start open, you can do it without setting the focus.)
    Last edited by Peter M; 12-11-2017 at 03:15 PM. Reason: Clarification

  7. #7
    Rokkit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    4
    I've been there and done that (and just re-verified that again, too!) For some reason when the form loads it will not execute the dropdown command if the SetFocus begins on the dropdown field. I have to tab to it. Even OnDirty.dropdown command does not work if the dropdown is the field that has focus when the form loads.

    Thanks for the suggestion, though

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

Similar Threads

  1. Replies: 4
    Last Post: 09-13-2017, 02:29 PM
  2. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  3. Replies: 2
    Last Post: 07-14-2014, 10:34 AM
  4. Replies: 1
    Last Post: 06-27-2014, 10:51 AM
  5. Replies: 15
    Last Post: 08-20-2013, 07:50 AM

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