Dim Filter As String
If e.Form.Controls("RadioButton1").Checked Then
Filter = "健康状况 Is null"
ElseIf e.Form.Controls("RadioButton2").Checked Then
Filter = "是否参加大病保险 Is null"
End If
If Filter > "" Then
Tables("户信息总表").Filter = Filter
Else
MessageBox.Show("数据无误")
End If
筛选数据时,如果数据符合条件的话显示筛选出的数据,否则数据无误的话输出“数据无误”,怎么实现?
If Filter > "" Then
Tables("户信息总表").Filter = Filter
if Tables("户信息总表").rows.count > 0 then
MessageBox.Show("数据无误")
else
MessageBox.Show("没有符合条件的数据")
end if
End If