function V_ar(batnum as string) ..... ..... g_RecSet.DoQuery ("select [batchnum] from [OIBT] where [BatchNum] ='" & batnum & "'") ..... end function再去调用这个函数如: ..... if not Var(text1.text) then exit sub .... end sub 可以这么写不?是不是这个text1.text的值就是我这个查询的batnum的值? 看看理解正确不?
batnum :表示一个程序内的变量。
.....
.....
g_RecSet.DoQuery ("select [batchnum] from [OIBT] where [BatchNum] ='" & batnum & "'")
.....
end function再去调用这个函数如:
.....
if not Var(text1.text) then
exit sub
....
end sub
可以这么写不?是不是这个text1.text的值就是我这个查询的batnum的值?
看看理解正确不?
不过 你function 没有没有定义类型