
此主题相关图片如下:未标题-1.gif

上面为定单主表 Datalist
chick代码如下:
Maintable = Tables("定单主表")
Dim dst As WinForm.DataList = e.Form.Controls("DataList1")
Dim dr as DataRow = dst.Current '获得选定行
If dr Is Nothing Then
Return
End If
Dim Index As Integer = Tables("定单主表").FindRow(dr) '获得选定行在Tables("订单")中的位置
If Index >=0 Then '如果选定行在Tables("订单")中存在
Tables("定单主表").Position = Index '定位到选定行
End If下面的表格为定单明细
RelationTable1
两者通过合同编号相关联
为什么点击定单主表的行,不能关联显示定单明细?
[此贴子已经被作者于2009-6-23 15:17:10编辑过]
RelationTable1
只有table1了吧?关联窗口重新设置一下,插入table控件,绑定关联.