以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关联子表列定位问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=49322)

--  作者:SZDVYE
--  发布时间:2014/4/16 0:20:00
--  关联子表列定位问题

两个关联表,父表A, 子表B

主表为子表B的时候,如何让关联B表自动定位在第一列,同时关联表BA定位在第一列。

我写的代码如下,请老师们再指点一下:

在表Bcurrentchanged事件写代码

 

If Tables("B.A").current IsNot Nothing Then
    
    Tables("B.A").Select(0,0)

    
End If

If Tables("B.A") Is Nothing Then

    
    Tables("A").Select(0,0)
    
End If


--  作者:Bin
--  发布时间:2014/4/16 8:35:00
--  

If Tables("B.A").current IsNot Nothing Then
    
    Tables("B.A").Select(0,0)

    
End If

If Tables("B").current IsNot Nothing Then

    
    Tables("B").Select(0,0)
    
End If



--  作者:SZDVYE
--  发布时间:2014/4/16 13:26:00
--  
谢谢老师