e.form.Controls("DateTimePicker1").Value =Date.Today() e.form.Controls("combobox1").Value = "湖南公司" Dim Filter As String = "1=1" With e.Form.Controls("combobox1") If .Value IsNot Nothing Then Filter &= " and 销售单位 = '" & .Value & "'" End If End With With e.Form.Controls("datetimepicker1") If .Value IsNot Nothing Then Filter &= " and 销售日期 = '" & .Value & "'" End If End With If Filter > "" Then Tables("销售单").Filter = Filter End If
|