Dim A As String = e.Form.Controls("ComboBox1").Value Dim B As String = e.Form.Controls("ComboBox2").Value Dim A1 As Long = CInt(A) Dim B1 As Long = CInt(B) If A Is Nothing OrElse B Is Nothing Then MessageBox.Show("请选择起始值和截至值!","提示", MessageBoxButtons.OK ,MessageBoxIcon.Information) Return Else If B1<A1 Then MessageBox.Show("截至值不能小于起始值", "提示") Return Else Tables("表A").Filter = "[序号] >= A1 And [序号] <= B1" End If End If
2楼
雨中的泪 发表于:2011/12/30 14:34:00
Tables("表A").Filter = "[序号] >= A1 And [序号] <= B1" 中的A1和B2为变量,是整数