|
本帖最后由 cocopig 于 2012-8-20 15:46 编辑
设有列表框“me.cmbReverson”,里有三个选项“全部”、“未回复”、“已回复”。编写代码如下:
if not IsNull(me.xxx) then
strWhere=strWhere & ........
...........
If Not IsNull(Me.cmbReversion) Then
Select Case Me.cmbReversion
Case "全部"
strWhere = strWhere
Case "未回复"
strWhere = strWhere & "([Reversion] = '是' AND [FinishedDate] is Null) and "
Case "已回复"
strWhere = strWhere & "([Reversion] = '是' AND [FinishedDate] Is not Null) and "
Case Default
MsgboxShow "非法输入,请从下拉列表中选择!", "错误"
Exit Sub
End Select
End If
If Len(strWhere) > 0 Then
strWhere = Left(strWhere, Len(strWhere) - 5)
End If
Me.fmSubSupervisalPaperList.Form.Filter = strWhere
Me.fmSubSupervisalPaperList.Form.FilterOn = True
“已回复”和“未回复”选项执行正常。执行过“已回复”或“未回复”选项后,再执行“全部”,记录集就一闪而过,先出现,立即消失。这是什么原因?如何解决?
|
|