--
调整了一下代码位置
在PositionChanged事件中的代码
If e.Table.Current Is Nothing Then \'如果Current为Nothing
\'没有选定行时执行的代码
Vars("lbbz_lwg") = Nothing
Else
\'有选定行时执行的代码
Vars("lbbz_lwg") = CurrentTable.Current("列表标志")
Vars("lbbz_lwg") = DataTables("常用列表").GetComboListString("列表值","列表项 = \'" & Vars("lbbz_lwg") & "\'")
End If
在PrepareEdit的代码
If e.IsFocusCell Then
If e.Col.Name = "统计表项" Then
If e.Row("是否统计表项") = True Then
e.Col.DropForm = ""
e.Col.ComboList = DataTables(Vars("tjbx_lwg")).GetComboListString("统计项","[统计表名] = \'机电类统计表\'","序号")
Else
e.Cancel = True
End If
End If
If e.Col.Name = "项目值" Then
If Vars("lbbz_lwg") = "[Date]" Then
e.Col.ComboList = Nothing
e.Col.DropForm = "下拉日期"
Else
e.Col.DropForm = Nothing
e.Col.ComboList = Vars("lbbz_lwg")
End If
End If
End If
感觉 好像快了许多 ,正在测试中……