以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]焦点移不到指定单元格  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=41123)

--  作者:hzcaqjf
--  发布时间:2013/10/11 16:42:00
--  [求助]焦点移不到指定单元格

表A的KeyDown事件:

If e.control = True AndAlso e.keycode = keys.A Then
        With Tables("表A")
            .AddNew()
            .Select(.Rows.Count - 1, 1)
         End With
        e.cancel = True

End If
在表A中,按下Ctrl + A 键,焦点移不到新增行的第二列.


--  作者:Bin
--  发布时间:2013/10/11 16:45:00
--  
在DataRowAdded事件中

Tables("表A").Select(Tables("表A").Current.Index,1,Tables("表A").Current.Index,1)

--  作者:hzcaqjf
--  发布时间:2013/10/11 16:52:00
--  

谢谢Bin老师.