Using office 2007 sp2. For each text box on my application on click event I inserted the below code to call a form called keyboard.
On the keyboard from i have a button called "enterbt" on the click event I inserted the below
I designed this method to decrease the number of forms on my application and use only one form called keyboard where user will be able to work on the program using a touchable screen. The problem now is on the subform.
If i have a subform the above code won't work.
How can i get the subform name where the focus is using vba ?
How can i assign value to the subform from the keyboard form ?
Code:
pctlname = Application.Screen.ActiveControl.Name Dim frmCurrentForm As Form Set frmCurrentForm = Screen.ActiveForm pfrmname = frmCurrentForm.Name DoCmd.OpenForm "Keyboard"
Code:
If (monitor & "") <> "" Then Forms(pfrmname)(pctlname) = monitor End If DoCmd.Close
If i have a subform the above code won't work.
How can i get the subform name where the focus is using vba ?
How can i assign value to the subform from the keyboard form ?
Comment