NumLock VBA programatically

cpampas

Registered User.
Local time
Today, 01:10
Joined
Jul 23, 2012
Messages
221
Hello,
I have a unbound text box (Text34), where a integer number should be entered, with following code:

Code:
Me.RecordsetClone.FindFirst "[MovimentoID] = " & Me![Text34]
Me.Bookmark = Me.RecordsetClone.Bookmark
Me.Text34 = Null
Text34.SetFocus

Code runs fine and finds the expected record, but right after that NumLock is disabled.
Is there a way to keep the Numlock on ?

I tried to add into the last line of code : SendKeys "{NUMLOCK}", True
but NO results

Any thoughts ?
 
I don't know how the numlock is getting affected. I don't see you using SendKeys in your code.
 
Code runs fine and finds the expected record, but right after that NumLock is disabled.
Is there a way to keep the Numlock on ?
I don't see a reason why your code would toggle the NumLock state. This usually only happens when using the SendKeys function, which should be avoided anyway. - So, maybe you review your code, whether there is something else triggering the NumLock issue.

In any case, you can use my Keyboard-State sample to set the NumLock state.
 
Hello
I had a SendKeys function in another event of the form, that Ihave removed, and now it seems that all is working well
Thank you all for the kind help
 

Users who are viewing this thread

Back
Top Bottom