以下是引用hcx0522在2014-7-23 9:53:00的发言:
此主题相关图片如下:qq图片20140723094621.jpg
请问窗口设计里面的出仓管理,和盘点单管理,为什么点自定义项目出不来呢?可是进仓管理又可以,这是为什么?谢谢。
思路:
1、用public变量记录打开窗口的表:
http://www.foxtable.com/help/topics/1842.htm
2、CellButtonClick事件代码为:
If e.Col.name = "存货名称" Then
maname = e.Table.Name
e.cancel = True
Forms("导入物料").open
Tables("物料信息").Filter = ""
End If
3、Doubleclick事件代码改为:
If Forms("导入物料").opened = True Then
If maname = "进仓" Then
Dim r As Row = Tables("进仓").Current
Dim r1 As Row = Tables("物料信息").Current
Dim sts() As String = {"染料代号","存货名称","单价","供应商"}
For Each st As String In sts
r(st) = r1(st)
Next
ElseIf maname= "出仓" Then
Dim r As Row = Tables("出仓").Current
Dim r1 As Row = Tables("物料信息").Current
Dim sts() As String = {"染料代号","存货名称"}
For Each st As String In sts
r(st) = r1(st)
Next
ElseIf maname = "盘点单" Then
Dim r As Row = Tables("盘点单").Current
Dim r1 As Row = Tables("物料信息").Current
Dim sts() As String = {"染料代号","存货名称"}
For Each st As String In sts
r(st) = r1(st)
Next
End If
Forms("导入物料").close
End If