Dim t As Table = Tables("供应商资料子表")
With Tables("供应商资料主表")
If .Current Is Nothing Then Return
t.Filter = "代码 = '" & .Current("代码") & "'"
End With
普通代码如上
Dim tbn As String = Args(0)'主表名
Dim tbn1 As String = Args(1)'子表名
Dim cn As String = Args(2)'关联列名
Dim t As Table = Tables(tbn1)
With Tables(tbn)
If .Current IsNot Nothing Then Return Nothing
t.Filter = "cn = '" & .Current(cn) & "'"
End With
Return Nothing
内部函数如上
一执行就出错死窗口,求红色部分指正一下,cn该如何表示?if ...ruturn后面的返回nothing可以这样写吗?