我做了一个内部函数,名称为:患者筛选。函数的代码如下:
'''此函数返回患者筛选条件
Dim t1,t2,t3,t4,filter As String
t1 = Vars("PID")
t2 = Vars("xm")
If t1 > "" And t2 > "" Then
If ValidPIN(t1) = True Then
Dim d1 As Date = ReadBirthDay(t1)
t3 = Format(d1,"yyyyMMdd")
Else
Dim i As Integer = t1.length
t3 = t1.Substring(i-8)
End If
t3 = "'*" & t3 & "*'"
filter = "[PatientsID] like " & t3 & " and [姓名]= '" & Vars("xm") & "'"
Else
filter = ""
End If
现在在其它地方引用它,想获取filter的值。我的代码是:
Dim filter As String = Functions.Execute("患者筛选")
MessageBox.Show(filter)
messagebox显示为空,错在哪儿?谢谢!