Selasa, 04 Juni 2019

[MS_AccessPros] Unwanted NumLock toggle

 

I found a snippet of code that I thought would be useful: When a form's text field which is formatted for date gets the focus, the snippet of code pops up the calendar by using the SendKeys function to send ALT DOWN. Here is the code:

Private Sub TestDate_GotFocus()
   If Nz(Me!TestDate, "") = "" Then
      SendKeys "%{DOWN}"
   End If
End Sub


This works OK as far as popping up the calendar and is something I'd like to use. But . . . seems like there's always a but . . . the SendKeys also toggles NumLock. So if NumLock is ON when the TestDate field gets the focus, NumLock is toggled OFF. And vice versa.

My desktop computer is Windows 10, Office Professional 2016, LogiTech MK520 keyboard/mouse combo. The NumLock toggle is consistently repeatable.

I tried the same form on a Dell M4800 laptop, also Windows 10 and Office Professional 2016. NumLock does not toggle on this machine. So the NumLock toggle seems to be machine dependent.

Any ideas as to how to overcome the NumLock toggle on the desktop computer? Does the toggle have something to do with LogiTech keyboard?

Thanks.

Steve

__._,_.___

Posted by: Steve thaw5 <thaw5@suddenlink.net>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar