VoodooRage
Programmer
Hello, I am running a timer event that takes the focus from the active control. I have the following code to determine the active control at the time the focus is taken away.
' Determine the name of the "Active" form at
the time of the error.
Dim getfrm As Form
Dim getfrmname As String
Set getfrm = Screen.ActiveForm
getfrmname = getfrm.Name
' Determine the name of the "Active" Control at
the time of the error.
Dim getcntl As Control
Dim getcntlname As String
Set getcntl = Screen.ActiveControl
getcntlname = getcntl.Name
How can I use these two variables to return the focus to the active control?
I.E. Forms!ActiveForm!ActiveControl.setfocus
Thanks!
' Determine the name of the "Active" form at
the time of the error.
Dim getfrm As Form
Dim getfrmname As String
Set getfrm = Screen.ActiveForm
getfrmname = getfrm.Name
' Determine the name of the "Active" Control at
the time of the error.
Dim getcntl As Control
Dim getcntlname As String
Set getcntl = Screen.ActiveControl
getcntlname = getcntl.Name
How can I use these two variables to return the focus to the active control?
I.E. Forms!ActiveForm!ActiveControl.setfocus
Thanks!