如图,对窗口控件的值进行筛选,其中用到radiobutton控件,我试着录入代码,但结果不对,请指教 !

此主题相关图片如下:qq截图20141118084900.png

Dim Filter As String
With e.Form.Controls("生产单号")
If .Value IsNot Nothing Then
Filter = "生产单号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("客户代号")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " and "
End If
Filter = Filter & "客户代号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("已完成")
If .checked = False Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "已完成 = true"
End If
End With
With e.Form.Controls("未完成")
If .checked = False Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "已完成 = false"
End If
End With
With e.Form.Controls("全部")
Filter = Filter & " And "
End With
If Filter > "" Then
DataTables("收款主表").loadFilter = Filter
DataTables("收款主表").load
End If
[此贴子已经被作者于2014-11-18 10:30:38编辑过]