SendKeys working incorrectly

latex88

Registered User.
Local time
Today, 09:36
Joined
Jul 10, 2003
Messages
198
Hi,

These buttons with SendKeys functions for page up and page down were working fine yesterday, but today, when they are pressed, the are changing the Num Lock. Very strange. Below are the codes I used for page up and page down. Has anyone experience this before or have any idea why this is happening?
SendKeys "{PGUP}"
SendKeys "{PGUP}"
 
ByteMyzer, I see your response to my email, but somehow it's not posted here. I'm not sure if I'm missing something, but your suggestion goes down one record at a time only?

Instead of the *SendKeys*, use *DoCmd.GoToRecord*, like this:

Code:
---------
Private Sub cmdDown_Click()
On Error Resume Next
DoCmd.GoToRecord , , acNext
End Sub

Private Sub cmdUp_Click()
On Error Resume Next
DoCmd.GoToRecord , , acPrevious
End Sub
---------

What is the common practice out there to go to the second page on a continuous form? Everywhere I search, it seems people want to disabling PageUp/PadeDown instead of enabling. I need this function as the forms I'm developing are for touchscreens.
 
OR

Dim ws As Object
Set ws = CreateObject("WScript.shell")
ws.SendKeys "{PGUP}"
 
Thanks, ByteMyzer for the link. That code sure seems convoluted. I may give that a try.

Ari, I was hoping your code would work. Maybe it's my computer, but your code does the same thing. The form would go page up and down, but at the same time, it toggles the num lock.
 
Try rebooting your machine. I've had that solve problems with SendKeys before.
 

Users who are viewing this thread

Back
Top Bottom