Is there anyway to change focus from textbox on a toolbar to the currently active control of the active form?
For example, I have a textbox on a toolbar for searching. When the user hits Enter, I would like to return them to the active control on their active form.
I use KeyPress to detect Enter key, but I can't seem to get focus to leave my toolbar unless I release the toolbar itself.
Here's how I'm trying to return focus back to my active control:
if type( "_Screen.ActiveForm.ActiveControl.Name" ) == "C"
activate window (_Screen.ActiveForm.Name)
_Screen.ActiveForm.ActiveControl.SetFocus()
set message to "Setfocus() to " + _Screen.ActiveForm.ActiveControl.Name
else
set message to "No activecontrol to set focus to"
endif
Any ideas?
Malcolm