1.窗口上的”表A的字段有“物料号,品名,数量,订单单号,销售单号‘’,想实现单击”销售单号“,联动到销售单的主表的”销售单号‘“(其过程:打开销售单窗口,显示表A”销售单号“的记录,其中销售单是主从关联表,也就是销售主和销售明细表)?2,我看帮助做一下反映
If e.Table.Current Is Nothing Then '如果Current为Nothing
Return '则返回
End If
Dim wz As Integer
Dim dr As DataRow
dr = DataTables("销售主表").Find("[销售单号] = '" & e.Table.Current("销售单号") & "'")
If dr IsNot Nothing Then
wz = Tables("销售主表").FindRow(dr)
If wz >= 0 Then
Tables("销售主表").Position = wz
End If
End If
Forms("销售单").Open()