Dim name As String = e.Form.Controls("ComboBox1").value If name = "" MessageBox.Show("客户名称不能为空") Return End If Dim d As Date = e.Form.Controls("DateTimePicker1").value Dim d1 As Date = e.Form.Controls("DateTimePicker2").value If d = Nothing MessageBox.Show("开始日期不能为空") Return End If If d1 = Nothing MessageBox.Show("结束日期不能为空") Return End If Tables("销售主表").Filter = "客户 = '" & name & "' and 日期 > = #" & d & "# and 日期 <= #" & d1 & "#"
|