我想检查是否存在空值,使用以下代码。但在文本框中仍然会有值。而且文本框中的值是"( ) -"。
If Text_Phone.Text IsNot "" Then
If BuildSqlFlag = True Then
BuildSql = BuildSql & " AND " & "Phone = " & Text_Phone.Text
Else
BuildSql = "Phone = " & Text_Phone.Text
End If
BuildSqlFlag = True
End If
我不确定我的代码需要改变什么,我尝试了以下操作:
If Text_Phone.Text IsNot "( ) -" Then
但是这并没有什么帮助。