dim zzy as row = Tables("专业").CurrentDim zzh As Row = Tables("报告").AddNew
Functions.Execute("顺序","zzy","zzh")
顺序函数如下:
If args(0)("批次") = "本科" Then
args(1)("批次顺序")=200
ElseIf args(0)("批次") = "专科" Then
args(1)("批次顺序")=400
Else
args(1)("批次顺序")=1000
End If
错误所在事件:自定义函数顺序
详细错误信息:
调用的目标发生了异常。
从字符串“批次”到类型“Integer”的转换无效。
输入字符串的格式不正确。
请问怎么修改自定义函数?谢谢!!
批次列是什么列类型?
试试
dim zzy as row = Tables("专业").Currentif zzy isnot nothing
Dim zzh As Row = Tables("报告").AddNew
Functions.Execute("顺序","zzy","zzh")
endif
函数
dim zzy as row = args(0)
Dim zzh As Row = args(1)
If zzy("批次") = "本科" Then
zzh("批次顺序")=200
ElseIf zzy("批次") = "专科" Then
zzh("批次顺序")=400
Else
zzh("批次顺序")=1000
End If