且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何测试特定控件是否具有焦点?

更新时间:2023-12-06 14:30:29

对于当前形式,这是

If (mytoggle Is Me.ActiveControl) Then

对于当前的Access.Application:

This for the current Access.Application:

If (mytoggle Is Screen.ActiveControl) Then

请注意,如果没有控件具有焦点,则* .ActiveControl可能不存在.

Be careful, if no control has focus, *.ActiveControl may not exist.