您的作品报价系统中的窗口5查询按钮里有一段这样的代码
能否抽空给俺们这些菜鸟讲解一下标记了红色的符号的使用意义及此行条件代码的意思吗?
Dim F As String =e.Form.Controls("列名").Value
Dim z As String =e.Form.Controls("关键字").Value
Dim s As Single
Dim d As Date
Dim Filter As String
If z="" OrElse f= "" Then
MessageBox.Show("列名或关键字不能为空.", "提示", MessageBoxButtons.ok, MessageBoxIcon.Information)
ElseIf Tables("产品明细").Cols( f ).IsNumeric Then '如果筛选列中数值型
Single.TryParse(z,s) '将变量转换成数值型
Filter = F & "= " & s
Else
Filter = F & " Like '*" & z & "*'"
End If
If Filter > "" Then
Tables("产品明细").Filter = Filter
End If
[此贴子已经被作者于2008-12-15 22:59:07编辑过]