Hi,
I have an Access db with a form that has a field that when double tap, it will open the toggle screen keyboard. I also tried to open the On Screen keyboard as well. Does anyone know how I can write vba code that when I click on a button it will open the On Screen Keyboard or the Toggle Screen keyboard. Also On Enter I would like the keyboards to open?
I tried these and none of them work?
-----------------------------------------------------------------------------------------------
Private Sub Test1_Click(KeyCode As Integer, Shift As Integer)
Application.FollowHyperlink "C:\Windows\WinSxS\amd64_microsoft-windows-osk_31bf3856ad364e35_10.0.10586.0_none_37426bc5044 5e4b2\osk.exe"
End Sub
-----------------------------------------------------------------------------------------------
Private Sub Test2_Click()
shell "C:\Windows\System32\osk.exe"
End Sub
-----------------------------------------------------------------------------------------------
Private Sub Test3_Click()
Dim stappname As String
stappname = "osk.exe"
Call shell(stappname, 1)
End Sub
-----------------------------------------------------------------------------------------------
Private Sub Test4_Click()
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal lpnShowCmd As Long) As Long
Public Sub ShellEx()
ShellExecute hWndAccessApp, "open", "C:\Windows\WinSxS\amd64_microsoft-windows-osk_31bf3856ad364e35_10.0.10586.0_none_37426bc5044 5e4b2\osk.exe", 0, 0, 1
End Sub
-----------------------------------------------------------------------------------------------
Private Sub Test5_Click()
DoCmd.SetWarnings False
ShellExecute hWndAccessApp, "open", "C:\Windows\System32\osk.exe", 0, 0, 1
'Shell "C:\Windows\System32\osk.exe"
DoCmd.SetWarnings True
End Sub