On-screen keyboard on subform (1 Viewer)

Pavczech

Registered User.
Local time
Today, 15:38
Joined
Jul 11, 2012
Messages
41
Hi
I have my on-screen keyboard which works fine on main form but when i put subform on it it doesn't work it said it lost the focus or object doesn't support this property or method. Here is the code:

Private Function TypeAlphaNum(strKey As String) As String
Screen.PreviousControl.SetFocus
Me.Controls(Screen.ActiveControl.Name).SelStart = Nz(Len(Me.Controls(Screen.ActiveControl.Name)), 0)
Me.Controls(Screen.ActiveControl.Name).SelLength = 0
Me.Controls(Screen.ActiveControl.Name).Value = Me.Controls(Screen.ActiveControl.Name).Value & strKey
End Function

I have added the example too.
Thanks very much in advance.
 

Attachments

  • Visitors Book9 - 2.accdb
    968 KB · Views: 204

itaiv

New member
Local time
Today, 17:38
Joined
May 19, 2013
Messages
6
Hello Pavczech,
I encountered the same problem with the same keyboard code which you wrote, did you managed to solve the problem some how? I will be very happy to know how it might be done.
Thanks
 

JHB

Have been here a while
Local time
Today, 16:38
Joined
Jun 17, 2012
Messages
7,732
Set focus to a control, when the form open like that:
Code:
Private Sub Form_Open(Cancel As Integer)
  Me.FirstName.SetFocus
End Sub
 

Users who are viewing this thread

Top Bottom