Private _db As DBAccess
Dim ds As DataSet
Dim strSql As String
strSql = ""
strSql = +" Select * "
strSql = +" From TABLE1"
strSql =+ " where 発注NO Is null"
strSql = +" And 品目区分 = '1'"
ds = _db.GetData(strSql)
If ds.Tables(0).Rows.Count = 0 Then
msgbox("SQL結果は存在しませんでした")
else
msgbox("SQL結果は存在します")
end if