我有两列,如果pricesource
列的值类似'先前值'且PO_DATE
列有空,那么我必须显示消息“它有空”,我尝试了一些像这样,但没有得到适当的输出。纠正我
Dim rst As Recordset
Set rst = db.OpenRecordset("select pricesource from [Input Norm] where pricesource='Prior File'")
If rst And IsNull(PO_DATE) Then
MsgBox "PO_DATE HAS NULLS, Please check"
End If
答案 0 :(得分:0)
您可以使用:
Dim rst As Recordset
Set rst = db.OpenRecordset("select PO_DATE from [Input Norm] where pricesource='Prior File'")
If rst.RecordCount > 0 Then
If IsNull(rst!PO_DATE.Value) Then
MsgBox "PO_DATE has Nulls, please check."
End If
End If
rst.Close
Set rst = Nothing