请问如何判断SQL语句值是否为空
If InStr(1, Text2.Text, "%", vbTextCompare) > 0 Then
ic = "select 内码,品名,成份名,药品类别,规格,配伍禁忌 from 电子审方 where 简拼 Like '%" & Trim(Text2.Text) & "%'"
Else
ic = "select 内码,品名,成份名,药品类别,规格,配伍禁忌 from 电子审方 where 简拼 = '" & Trim(Text2.Text) & " '"
End If
Form2.Adodc1.RecordSource = ic
MsgBox "无货!"
Else
Set Form2.DataGrid1.DataSource = Form2.Adodc1
Form1.Hide
Form2.Show
End If
End Sub
End Sub
目的:IC没有结果时,提示无货,有结果时form2.show