---------------------------
错误
---------------------------
自定义代码执行出错,错误信息:
System.NullReferenceException: 未设置对象变量或 With 块变量。
在 Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase, CallType CallType)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSetComplex(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase)
在 UserCode.AFIELDCLOSE(Object[] Args)
---------------------------
确定
---------------------------
自定义函数
Dim s As String
For Each c As WinForm.Control In Forms(Args(0)).Controls
For Each co As Col In Tables(Args(1)).Cols
If co.AllowEdit = False Then
If c.BindingField > "" AndAlso c.BindingField.Contains(Args(1) & "." & co.Name) Then
Forms(Args(0)).Controls(c.Name).Enabled = False
End If
End If
Next
Next
s = DataTables("授权表").GetComboListString("列名或按钮","用户名 = '" & User.Name & "' And 类型 = '窗口' And 不可编辑 = True And 表名或窗口 = '" & Args(0) & "'")
s = “修改”
If s IsNot Nothing Then
For Each c As WinForm.Control In Forms(Args(0)).Controls
If s.Contains(c.Name) Then
Forms(Args(0)).Controls(c.Name).Enabled = False
End If
Next
End If
错误应该在上段
是放在AfterLoad里执行的
[此贴子已经被作者于2014-3-11 9:19:35编辑过]